From e7bad7218f514334a851a6db19c7e83e027b8299 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 22 Mar 2020 07:12:08 -0400 Subject: [PATCH] - fix status bar scaling: use a fractional that takes full advantage of the precision type, rather than a static numerical constant. (this fixes rendering in very odd resolutions such as 1440x847) --- src/g_statusbar/shared_sbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_statusbar/shared_sbar.cpp b/src/g_statusbar/shared_sbar.cpp index 31e3e451d..6bb606e48 100644 --- a/src/g_statusbar/shared_sbar.cpp +++ b/src/g_statusbar/shared_sbar.cpp @@ -478,7 +478,7 @@ void DBaseStatusBar::SetScale () { // Wider or equal than 4:3 SBarTop = Scale(sby, h, VerticalResolution); - double width4_3 = w * 1.333 / aspect; + double width4_3 = w * (4 / 3) / aspect; ST_X = int((w - width4_3) / 2); } else @@ -486,7 +486,7 @@ void DBaseStatusBar::SetScale () ST_X = 0; // this was far more obtuse before... - double height4_3 = h * aspect / 1.333; + double height4_3 = h * aspect / (4 / 3); SBarTop = int(h - height4_3 + sby * height4_3 / VerticalResolution); } Displacement = 0;