From f3fb5c092ce8d022496c6c51376f1c6581add9a2 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 7 Dec 2008 22:04:24 +0000 Subject: [PATCH] Whoops, fixed pitch bug after resizing a surface --- src/video/SDL_blit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video/SDL_blit.c b/src/video/SDL_blit.c index e395e65c2..84a516cea 100644 --- a/src/video/SDL_blit.c +++ b/src/video/SDL_blit.c @@ -72,6 +72,7 @@ SDL_SoftBlit(SDL_Surface * src, SDL_Rect * srcrect, (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 @@ SDL_SoftBlit(SDL_Surface * src, SDL_Rect * srcrect, (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;