mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-12 20:32:27 +00:00
Fix building with SDL 2.0.20 or earlier
This commit is contained in:
parent
7717749b72
commit
255cbd1e7e
1 changed files with 2 additions and 2 deletions
|
@ -938,8 +938,8 @@ void Session::getWindowDimensions(int& x, int& y,
|
||||||
src.x = src.y = dst.x = dst.y = 0;
|
src.x = src.y = dst.x = dst.y = 0;
|
||||||
src.w = m_StreamConfig.width;
|
src.w = m_StreamConfig.width;
|
||||||
src.h = m_StreamConfig.height;
|
src.h = m_StreamConfig.height;
|
||||||
dst.w = ((int)SDL_roundf(usableBounds.w * 0.80f) & ~0x1);
|
dst.w = ((int)SDL_ceilf(usableBounds.w * 0.80f) & ~0x1);
|
||||||
dst.h = ((int)SDL_roundf(usableBounds.h * 0.80f) & ~0x1);
|
dst.h = ((int)SDL_ceilf(usableBounds.h * 0.80f) & ~0x1);
|
||||||
|
|
||||||
// Scale the window size while preserving aspect ratio
|
// Scale the window size while preserving aspect ratio
|
||||||
StreamUtils::scaleSourceToDestinationSurface(&src, &dst);
|
StreamUtils::scaleSourceToDestinationSurface(&src, &dst);
|
||||||
|
|
Loading…
Reference in a new issue