mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- 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:
parent
aa0df7479e
commit
e7bad7218f
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue