Whoops, fixed pitch bug after resizing a surface
authorSam Lantinga <slouken@libsdl.org>
Sun, 07 Dec 2008 22:04:24 +0000
changeset 285043691ef70176
parent 2849 523b10db69f8
child 2851 6c3fbeb04eca
Whoops, fixed pitch bug after resizing a surface
src/video/SDL_blit.c
     1.1 --- a/src/video/SDL_blit.c	Sun Dec 07 21:53:28 2008 +0000
     1.2 +++ b/src/video/SDL_blit.c	Sun Dec 07 22:04:24 2008 +0000
     1.3 @@ -72,6 +72,7 @@
     1.4              (Uint16) srcrect->x * info->src_fmt->BytesPerPixel;
     1.5          info->src_w = srcrect->w;
     1.6          info->src_h = srcrect->h;
     1.7 +        info->src_pitch = src->pitch;
     1.8          info->src_skip =
     1.9              info->src_pitch - info->src_w * info->src_fmt->BytesPerPixel;
    1.10          info->dst =
    1.11 @@ -79,6 +80,7 @@
    1.12              (Uint16) dstrect->x * info->dst_fmt->BytesPerPixel;
    1.13          info->dst_w = dstrect->w;
    1.14          info->dst_h = dstrect->h;
    1.15 +        info->dst_pitch = dst->pitch;
    1.16          info->dst_skip =
    1.17              info->dst_pitch - info->dst_w * info->dst_fmt->BytesPerPixel;
    1.18          RunBlit = (SDL_BlitFunc) src->map->data;