Set explicit scaling mode for all SDL textures

This commit is contained in:
Cameron Gutman 2026-01-17 02:34:54 -06:00
commit 218ffc2d55
2 changed files with 5 additions and 3 deletions

View file

@ -251,6 +251,11 @@ void SdlRenderer::renderOverlay(Overlay::OverlayType type)
m_OverlayTextures[type] = SDL_CreateTextureFromSurface(m_Renderer, newSurface); m_OverlayTextures[type] = SDL_CreateTextureFromSurface(m_Renderer, newSurface);
SDL_FreeSurface(newSurface); SDL_FreeSurface(newSurface);
if (m_OverlayTextures[type]) {
// Overlays are always drawn at exact size
SDL_SetTextureScaleMode(m_OverlayTextures[type], SDL_ScaleModeNearest);
}
} }
// If we have an overlay texture, render it too // If we have an overlay texture, render it too

View file

@ -243,9 +243,6 @@ FFmpegVideoDecoder::FFmpegVideoDecoder(bool testOnly)
SDL_zero(m_GlobalVideoStats); SDL_zero(m_GlobalVideoStats);
SDL_AtomicSet(&m_DecoderThreadShouldQuit, 0); SDL_AtomicSet(&m_DecoderThreadShouldQuit, 0);
// Use linear filtering when renderer scaling is required
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
} }
FFmpegVideoDecoder::~FFmpegVideoDecoder() FFmpegVideoDecoder::~FFmpegVideoDecoder()