From 255cbd1e7eac317b37553ccd327159e8b6a2d524 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 15 Oct 2022 15:36:09 -0500 Subject: [PATCH] Fix building with SDL 2.0.20 or earlier --- app/streaming/session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index 55a22f34..52f85592 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -938,8 +938,8 @@ void Session::getWindowDimensions(int& x, int& y, src.x = src.y = dst.x = dst.y = 0; src.w = m_StreamConfig.width; src.h = m_StreamConfig.height; - dst.w = ((int)SDL_roundf(usableBounds.w * 0.80f) & ~0x1); - dst.h = ((int)SDL_roundf(usableBounds.h * 0.80f) & ~0x1); + dst.w = ((int)SDL_ceilf(usableBounds.w * 0.80f) & ~0x1); + dst.h = ((int)SDL_ceilf(usableBounds.h * 0.80f) & ~0x1); // Scale the window size while preserving aspect ratio StreamUtils::scaleSourceToDestinationSurface(&src, &dst);