Skip to content

Commit 218ffc2

Browse files
committed
Set explicit scaling mode for all SDL textures
1 parent 0f49dca commit 218ffc2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

app/streaming/video/ffmpeg-renderers/sdlvid.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@ void SdlRenderer::renderOverlay(Overlay::OverlayType type)
251251

252252
m_OverlayTextures[type] = SDL_CreateTextureFromSurface(m_Renderer, newSurface);
253253
SDL_FreeSurface(newSurface);
254+
255+
if (m_OverlayTextures[type]) {
256+
// Overlays are always drawn at exact size
257+
SDL_SetTextureScaleMode(m_OverlayTextures[type], SDL_ScaleModeNearest);
258+
}
254259
}
255260

256261
// If we have an overlay texture, render it too

app/streaming/video/ffmpeg.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,6 @@ FFmpegVideoDecoder::FFmpegVideoDecoder(bool testOnly)
243243
SDL_zero(m_GlobalVideoStats);
244244

245245
SDL_AtomicSet(&m_DecoderThreadShouldQuit, 0);
246-
247-
// Use linear filtering when renderer scaling is required
248-
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
249246
}
250247

251248
FFmpegVideoDecoder::~FFmpegVideoDecoder()

0 commit comments

Comments
 (0)