mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 07:12:03 +00:00
Merge branch 'opengl-hud-scale-fix' into 'master'
OpenGL HUD scaling fix See merge request STJr/SRB2!320
This commit is contained in:
commit
3e6fcf1b8b
2 changed files with 10 additions and 7 deletions
|
@ -227,14 +227,14 @@ void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
|
|||
Z_Free(realpatch);
|
||||
}
|
||||
// centre screen
|
||||
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
||||
if ((float)vid.width != (float)BASEVIDWIDTH * dupx)
|
||||
{
|
||||
if (option & V_SNAPTORIGHT)
|
||||
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
||||
else if (!(option & V_SNAPTOLEFT))
|
||||
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/2;
|
||||
}
|
||||
if (vid.height != BASEVIDHEIGHT * vid.dupy)
|
||||
if ((float)vid.height != (float)BASEVIDHEIGHT * dupy)
|
||||
{
|
||||
if ((option & (V_SPLITSCREEN|V_SNAPTOBOTTOM)) == (V_SPLITSCREEN|V_SNAPTOBOTTOM))
|
||||
cy += ((float)vid.height/2 - ((float)BASEVIDHEIGHT/2 * dupy));
|
||||
|
@ -375,14 +375,14 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
|||
Z_Free(realpatch);
|
||||
}
|
||||
// centre screen
|
||||
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
||||
if ((float)vid.width != (float)BASEVIDWIDTH * dupx)
|
||||
{
|
||||
if (option & V_SNAPTORIGHT)
|
||||
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
||||
else if (!(option & V_SNAPTOLEFT))
|
||||
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/2;
|
||||
}
|
||||
if (vid.height != BASEVIDHEIGHT * vid.dupy)
|
||||
if ((float)vid.height != (float)BASEVIDHEIGHT * dupy)
|
||||
{
|
||||
if ((option & (V_SPLITSCREEN|V_SNAPTOBOTTOM)) == (V_SPLITSCREEN|V_SNAPTOBOTTOM))
|
||||
cy += ((float)vid.height/2 - ((float)BASEVIDHEIGHT/2 * dupy));
|
||||
|
@ -846,14 +846,14 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
|||
fw *= dupx;
|
||||
fh *= dupy;
|
||||
|
||||
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
||||
if ((float)vid.width != (float)BASEVIDWIDTH * dupx)
|
||||
{
|
||||
if (color & V_SNAPTORIGHT)
|
||||
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
||||
else if (!(color & V_SNAPTOLEFT))
|
||||
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2;
|
||||
}
|
||||
if (vid.height != BASEVIDHEIGHT * dupy)
|
||||
if ((float)vid.height != (float)BASEVIDHEIGHT * dupy)
|
||||
{
|
||||
// same thing here
|
||||
if (color & V_SNAPTOBOTTOM)
|
||||
|
|
|
@ -280,7 +280,10 @@ void SCR_Recalc(void)
|
|||
vid.fdupy = FixedDiv(vid.height*FRACUNIT, BASEVIDHEIGHT*FRACUNIT);
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_opengl && rendermode != render_none) // This was just placing it incorrectly at non aspect correct resolutions in opengl
|
||||
//if (rendermode != render_opengl && rendermode != render_none) // This was just placing it incorrectly at non aspect correct resolutions in opengl
|
||||
// 13/11/18:
|
||||
// The above is no longer necessary, since we want OpenGL to be just like software now
|
||||
// -- Monster Iestyn
|
||||
#endif
|
||||
vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy);
|
||||
|
||||
|
|
Loading…
Reference in a new issue