mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-13 04:42:27 +00:00
Fix SDL renderer scaling at non-native resolution
This commit is contained in:
parent
998d837ff4
commit
ca20d28a24
2 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,10 @@ bool SdlRenderer::initialize(SDL_Window* window,
|
|||
return false;
|
||||
}
|
||||
|
||||
// The window may be smaller than the stream size, so ensure our
|
||||
// logical rendering surface size is equal to the stream size
|
||||
SDL_RenderSetLogicalSize(m_Renderer, width, height);
|
||||
|
||||
m_Texture = SDL_CreateTexture(m_Renderer,
|
||||
SDL_PIXELFORMAT_YV12,
|
||||
SDL_TEXTUREACCESS_STREAMING,
|
||||
|
|
|
@ -139,6 +139,9 @@ int Session::drSetup(int videoFormat, int width, int height, int /* frameRate */
|
|||
{
|
||||
AVCodec* decoder;
|
||||
|
||||
// Use linear filtering when renderer scaling is required
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
|
||||
|
||||
av_init_packet(&s_Pkt);
|
||||
|
||||
if (!chooseDecoder(s_ActiveSession->m_Preferences.videoDecoderSelection,
|
||||
|
|
Loading…
Reference in a new issue