Mercurial > sdl-ios-xcode
comparison src/video/SDL_blit.c @ 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 | ff8db79a3cc9 |
children | 99210400e8b9 |
comparison
equal
deleted
inserted
replaced
2849:523b10db69f8 | 2850:43691ef70176 |
---|---|
70 info->src = (Uint8 *) src->pixels + | 70 info->src = (Uint8 *) src->pixels + |
71 (Uint16) srcrect->y * src->pitch + | 71 (Uint16) srcrect->y * src->pitch + |
72 (Uint16) srcrect->x * info->src_fmt->BytesPerPixel; | 72 (Uint16) srcrect->x * info->src_fmt->BytesPerPixel; |
73 info->src_w = srcrect->w; | 73 info->src_w = srcrect->w; |
74 info->src_h = srcrect->h; | 74 info->src_h = srcrect->h; |
75 info->src_pitch = src->pitch; | |
75 info->src_skip = | 76 info->src_skip = |
76 info->src_pitch - info->src_w * info->src_fmt->BytesPerPixel; | 77 info->src_pitch - info->src_w * info->src_fmt->BytesPerPixel; |
77 info->dst = | 78 info->dst = |
78 (Uint8 *) dst->pixels + (Uint16) dstrect->y * dst->pitch + | 79 (Uint8 *) dst->pixels + (Uint16) dstrect->y * dst->pitch + |
79 (Uint16) dstrect->x * info->dst_fmt->BytesPerPixel; | 80 (Uint16) dstrect->x * info->dst_fmt->BytesPerPixel; |
80 info->dst_w = dstrect->w; | 81 info->dst_w = dstrect->w; |
81 info->dst_h = dstrect->h; | 82 info->dst_h = dstrect->h; |
83 info->dst_pitch = dst->pitch; | |
82 info->dst_skip = | 84 info->dst_skip = |
83 info->dst_pitch - info->dst_w * info->dst_fmt->BytesPerPixel; | 85 info->dst_pitch - info->dst_w * info->dst_fmt->BytesPerPixel; |
84 RunBlit = (SDL_BlitFunc) src->map->data; | 86 RunBlit = (SDL_BlitFunc) src->map->data; |
85 | 87 |
86 /* Run the actual software blit */ | 88 /* Run the actual software blit */ |