aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRSDuck <RSDuck@users.noreply.github.com>2021-05-24 18:29:12 +0200
committerRSDuck <RSDuck@users.noreply.github.com>2021-05-24 18:29:12 +0200
commitf271bdf325835813e2abfd08f4a850be9807b8c4 (patch)
tree990b3d6b9dcf821086fb1439d4a1ea03e8224b13
parente02bbcb3ac72609969d68e54c7d7d03e05af493c (diff)
fix #906
-rw-r--r--src/frontend/Util_Video.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/frontend/Util_Video.cpp b/src/frontend/Util_Video.cpp
index 94c699c..73f934c 100644
--- a/src/frontend/Util_Video.cpp
+++ b/src/frontend/Util_Video.cpp
@@ -348,6 +348,9 @@ void SetupScreenLayout(int screenWidth, int screenHeight,
float primScale = std::min(screenWidth / primHSize, screenHeight / primVSize);
float secScale = 1.f;
+ if (integerScale)
+ primScale = floorf(primScale);
+
if (layout == 0)
{
if (screenHeight - primVSize * primScale < secVSize)
@@ -365,8 +368,8 @@ void SetupScreenLayout(int screenWidth, int screenHeight,
if (integerScale)
{
- primScale = floor(primScale);
- secScale = floor(secScale);
+ primScale = floorf(primScale);
+ secScale = floorf(secScale);
}
M23_Scale(primMtx, primScale);