changeset 2850:43691ef70176

Whoops, fixed pitch bug after resizing a surface
author Sam Lantinga <slouken@libsdl.org>
date Sun, 07 Dec 2008 22:04:24 +0000
parents 523b10db69f8
children 6c3fbeb04eca
files src/video/SDL_blit.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/SDL_blit.c	Sun Dec 07 21:53:28 2008 +0000
+++ b/src/video/SDL_blit.c	Sun Dec 07 22:04:24 2008 +0000
@@ -72,6 +72,7 @@
             (Uint16) srcrect->x * info->src_fmt->BytesPerPixel;
         info->src_w = srcrect->w;
         info->src_h = srcrect->h;
+        info->src_pitch = src->pitch;
         info->src_skip =
             info->src_pitch - info->src_w * info->src_fmt->BytesPerPixel;
         info->dst =
@@ -79,6 +80,7 @@
             (Uint16) dstrect->x * info->dst_fmt->BytesPerPixel;
         info->dst_w = dstrect->w;
         info->dst_h = dstrect->h;
+        info->dst_pitch = dst->pitch;
         info->dst_skip =
             info->dst_pitch - info->dst_w * info->dst_fmt->BytesPerPixel;
         RunBlit = (SDL_BlitFunc) src->map->data;