mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Fix incorrectly scaled output from the SDL renderer on macOS
This commit is contained in:
@@ -177,14 +177,14 @@ bool SdlRenderer::initialize(PDECODER_PARAMETERS params)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate the video region size, scaling to fill the window while
|
// Calculate the video region size, scaling to fill the output size while
|
||||||
// preserving the aspect ratio of the video stream.
|
// preserving the aspect ratio of the video stream.
|
||||||
SDL_Rect src, dst;
|
SDL_Rect src, dst;
|
||||||
src.x = src.y = 0;
|
src.x = src.y = 0;
|
||||||
src.w = params->width;
|
src.w = params->width;
|
||||||
src.h = params->height;
|
src.h = params->height;
|
||||||
dst.x = dst.y = 0;
|
dst.x = dst.y = 0;
|
||||||
SDL_GetWindowSize(params->window, &dst.w, &dst.h);
|
SDL_GetRendererOutputSize(m_Renderer, &dst.w, &dst.h);
|
||||||
StreamUtils::scaleSourceToDestinationSurface(&src, &dst);
|
StreamUtils::scaleSourceToDestinationSurface(&src, &dst);
|
||||||
|
|
||||||
// Ensure the viewport is set to the desired video region
|
// Ensure the viewport is set to the desired video region
|
||||||
|
|||||||
Reference in New Issue
Block a user