Software scaling support. Not very fast, but it seems to work.
This commit is contained in:
parent
20b4d9f762
commit
32d70d6f2b
3 changed files with 62 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue