mirror of
https://github.com/yawut/SDL.git
synced 2026-09-07 16:45:57 -05:00
Software scaling support. Not very fast, but it seems to work.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user