- 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)

This commit is contained in:
Rachael Alexanderson 2020-03-22 07:12:08 -04:00
parent aa0df7479e
commit e7bad7218f

View file

@ -478,7 +478,7 @@ void DBaseStatusBar::SetScale ()
{ {
// Wider or equal than 4:3 // Wider or equal than 4:3
SBarTop = Scale(sby, h, VerticalResolution); 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); ST_X = int((w - width4_3) / 2);
} }
else else
@ -486,7 +486,7 @@ void DBaseStatusBar::SetScale ()
ST_X = 0; ST_X = 0;
// this was far more obtuse before... // 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); SBarTop = int(h - height4_3 + sby * height4_3 / VerticalResolution);
} }
Displacement = 0; Displacement = 0;