mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-10 12:02:53 +02:00
Use SDL_LowerBlitScaled/SDL_SoftStretchLinear instead of SDL_BlitScaled
This commit is contained in:
parent
e477007061
commit
7539a2f34b
1 changed files with 12 additions and 2 deletions
|
@ -1086,7 +1086,16 @@ void Bitmap::stretchBlt(IntRect destRect,
|
|||
throw Exception(Exception::SDLError, "Error creating temporary surface for blitting: %s",
|
||||
SDL_GetError());
|
||||
|
||||
error = SDL_BlitScaled(srcSurf, &srcRect, blitTemp, 0);
|
||||
if (smooth)
|
||||
{
|
||||
error = SDL_SoftStretchLinear(srcSurf, &srcRect, blitTemp, 0);
|
||||
smooth = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_Rect tmpRect = {0, 0, blitTemp->w, blitTemp->h};
|
||||
error = SDL_LowerBlitScaled(srcSurf, &srcRect, blitTemp, &tmpRect);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1099,7 +1108,8 @@ void Bitmap::stretchBlt(IntRect destRect,
|
|||
throw Exception(Exception::SDLError, "Error creating temporary surface for blitting: %s",
|
||||
SDL_GetError());
|
||||
|
||||
error = SDL_BlitSurface(srcSurf, &srcRect, blitTemp, 0);
|
||||
SDL_Rect tmpRect = {0, 0, blitTemp->w, blitTemp->h};
|
||||
error = SDL_LowerBlit(srcSurf, &srcRect, blitTemp, &tmpRect);
|
||||
}
|
||||
|
||||
if (error)
|
||||
|
|
Loading…
Add table
Reference in a new issue