Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Whoops, fixed pitch bug after resizing a surface
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 7, 2008
1 parent e9f68de commit f3fb5c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/video/SDL_blit.c
Expand Up @@ -72,13 +72,15 @@ 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 =
(Uint8 *) dst->pixels + (Uint16) dstrect->y * dst->pitch +
(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;
Expand Down

0 comments on commit f3fb5c0

Please sign in to comment.