mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Merge branch 'SRB2-CHAT-FLOAT-FIX' into 'SRB2-CHAT'
Adjust vid.width floating point comparson for CHAT See merge request SinnamonLat/SRB2!3
This commit is contained in:
commit
08c2975cf6
1 changed files with 3 additions and 3 deletions
|
|
@ -845,14 +845,14 @@ void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color, INT32
|
||||||
fw *= dupx;
|
fw *= dupx;
|
||||||
fh *= dupy;
|
fh *= dupy;
|
||||||
|
|
||||||
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
if (fabsf((float)vid.width - ((float)BASEVIDWIDTH * dupx)) > 1.0E-36f)
|
||||||
{
|
{
|
||||||
if (options & V_SNAPTORIGHT)
|
if (options & V_SNAPTORIGHT)
|
||||||
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
||||||
else if (!(options & V_SNAPTOLEFT))
|
else if (!(options & V_SNAPTOLEFT))
|
||||||
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2;
|
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2;
|
||||||
}
|
}
|
||||||
if (vid.height != BASEVIDHEIGHT * dupy)
|
if (fabsf((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) > 1.0E-36f)
|
||||||
{
|
{
|
||||||
// same thing here
|
// same thing here
|
||||||
if (options & V_SNAPTOBOTTOM)
|
if (options & V_SNAPTOBOTTOM)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue