sdl3: fix build with last version of SDL3

This commit is contained in:
David Fort 2024-09-05 14:48:40 +02:00
parent d0cfd3b502
commit 3a9a820092
1 changed files with 4 additions and 4 deletions

View File

@ -184,12 +184,12 @@ bool SdlWindow::blit(SDL_Surface* surface, const SDL_Rect& srcRect, SDL_Rect& ds
return true;
if (!SDL_SetSurfaceClipRect(screen, &dstRect))
return true;
auto rc = SDL_BlitSurfaceScaled(surface, &srcRect, screen, &dstRect, SDL_SCALEMODE_BEST);
if (rc != 0)
if (!SDL_BlitSurfaceScaled(surface, &srcRect, screen, &dstRect, SDL_SCALEMODE_LINEAR))
{
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "SDL_BlitScaled: %s [%d]", sdl_error_string(rc), rc);
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "SDL_BlitScaled: %s", SDL_GetError());
return false;
}
return rc == 0;
return true;
}
void SdlWindow::updateSurface()