mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-22 12:11:21 +00:00
- Ensure the viewport's aspect ratio is factored into the HUD's aspect ratio.
* Fixes #617.
This commit is contained in:
parent
c5f27f28b7
commit
6aa94a9b8e
1 changed files with 6 additions and 3 deletions
|
@ -47,6 +47,7 @@
|
|||
#include "v_text.h"
|
||||
#include "vm.h"
|
||||
#include "i_interface.h"
|
||||
#include "r_videoscale.h"
|
||||
|
||||
FGameTexture* CrosshairImage;
|
||||
static int CrosshairNum;
|
||||
|
@ -367,9 +368,11 @@ void DStatusBarCore::SetScale()
|
|||
double screenaspect = w / double(h);
|
||||
double aspectscale = 1.0;
|
||||
|
||||
double ViewportAspect = ViewportPixelAspect();
|
||||
|
||||
if ((horz == 320 && vert == 200) || (horz == 640 && vert == 400))
|
||||
{
|
||||
refaspect = 1.333;
|
||||
refaspect = (4. / 3.);
|
||||
if (!hud_aspectscale) aspectscale = 1 / 1.2;
|
||||
}
|
||||
|
||||
|
@ -384,9 +387,9 @@ void DStatusBarCore::SetScale()
|
|||
refw = h * refaspect;
|
||||
}
|
||||
refw *= hud_scalefactor;
|
||||
refh *= hud_scalefactor * aspectscale;
|
||||
refh *= hud_scalefactor * aspectscale / ViewportAspect;
|
||||
|
||||
int sby = vert - int(RelTop * hud_scalefactor * aspectscale);
|
||||
int sby = vert - int(RelTop * hud_scalefactor * aspectscale / ViewportAspect);
|
||||
// Use full pixels for destination size.
|
||||
|
||||
ST_X = xs_CRoundToInt((w - refw) / 2);
|
||||
|
|
Loading…
Reference in a new issue