Set explicit scaling mode for all SDL textures
This commit is contained in:
parent
0f49dca4c0
commit
218ffc2d55
2 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue