mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-22 11:31:11 +00:00
- Change viewport aspect calculation from 6aa94a9b8e
to be a reciprocal multiplication.
This commit is contained in:
parent
f8035bb4ba
commit
17392fe400
1 changed files with 3 additions and 3 deletions
|
@ -368,7 +368,7 @@ void DStatusBarCore::SetScale()
|
||||||
double screenaspect = w / double(h);
|
double screenaspect = w / double(h);
|
||||||
double aspectscale = 1.0;
|
double aspectscale = 1.0;
|
||||||
|
|
||||||
double ViewportAspect = ViewportPixelAspect();
|
const double ViewportAspect = 1. / ViewportPixelAspect();
|
||||||
|
|
||||||
if ((horz == 320 && vert == 200) || (horz == 640 && vert == 400))
|
if ((horz == 320 && vert == 200) || (horz == 640 && vert == 400))
|
||||||
{
|
{
|
||||||
|
@ -387,9 +387,9 @@ void DStatusBarCore::SetScale()
|
||||||
refw = h * refaspect;
|
refw = h * refaspect;
|
||||||
}
|
}
|
||||||
refw *= hud_scalefactor;
|
refw *= hud_scalefactor;
|
||||||
refh *= hud_scalefactor * aspectscale / ViewportAspect;
|
refh *= hud_scalefactor * aspectscale * ViewportAspect;
|
||||||
|
|
||||||
int sby = vert - int(RelTop * hud_scalefactor * aspectscale / ViewportAspect);
|
int sby = vert - int(RelTop * hud_scalefactor * aspectscale * ViewportAspect);
|
||||||
// Use full pixels for destination size.
|
// Use full pixels for destination size.
|
||||||
|
|
||||||
ST_X = xs_CRoundToInt((w - refw) / 2);
|
ST_X = xs_CRoundToInt((w - refw) / 2);
|
||||||
|
|
Loading…
Reference in a new issue