mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-02 15:55:39 +00:00
Fix SDL renderer scaling at non-native resolution
This commit is contained in:
parent
998d837ff4
commit
ca20d28a24
@ -37,6 +37,10 @@ bool SdlRenderer::initialize(SDL_Window* window,
|
|||||||
return false;
|
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,
|
m_Texture = SDL_CreateTexture(m_Renderer,
|
||||||
SDL_PIXELFORMAT_YV12,
|
SDL_PIXELFORMAT_YV12,
|
||||||
SDL_TEXTUREACCESS_STREAMING,
|
SDL_TEXTUREACCESS_STREAMING,
|
||||||
|
@ -139,6 +139,9 @@ int Session::drSetup(int videoFormat, int width, int height, int /* frameRate */
|
|||||||
{
|
{
|
||||||
AVCodec* decoder;
|
AVCodec* decoder;
|
||||||
|
|
||||||
|
// Use linear filtering when renderer scaling is required
|
||||||
|
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
|
||||||
|
|
||||||
av_init_packet(&s_Pkt);
|
av_init_packet(&s_Pkt);
|
||||||
|
|
||||||
if (!chooseDecoder(s_ActiveSession->m_Preferences.videoDecoderSelection,
|
if (!chooseDecoder(s_ActiveSession->m_Preferences.videoDecoderSelection,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user