Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Software scaling support. Not very fast, but it seems to work.

  • Loading branch information
KenRogoway committed Feb 14, 2011
1 parent 69af9a3 commit ea308dc521305636f3c5cc31f4ec244f993d2a69

File 2 of 3 in ea308dc

@@ -364,7 +364,12 @@ SW_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
if (!surface) {
return -1;
}
return SDL_BlitSurface(src, srcrect, surface, &final_rect);

if ( srcrect->w == final_rect.w && srcrect->h == final_rect.h ) {
return SDL_BlitSurface(src, srcrect, surface, &final_rect);
} else {
return SDL_BlitScaled(src, srcrect, surface, &final_rect);
}
}

static int

0 comments on commit ea308dc

Please sign in to comment.