Fix float-equal warning in Win32 interface

This commit is contained in:
Alam Ed Arias 2018-12-16 14:01:28 -05:00
parent 11aef0b3f1
commit 6e79722437

View file

@ -996,7 +996,7 @@ static INT32 WINAPI VID_SetDirectDrawMode(viddef_t *lvid, vmode_t *currentmode)
// but rather render to memory bitmap buffer
lvid->direct = NULL;
if (!cv_stretch.value && (float)vid.width/vid.height != ((float)BASEVIDWIDTH/BASEVIDHEIGHT))
if (!cv_stretch.value && fabsf((float)vid.width/vid.height - ((float)BASEVIDWIDTH/BASEVIDHEIGHT)) > 1.0E-36f)
vid.height = (int)(vid.width * ((float)BASEVIDHEIGHT/BASEVIDWIDTH));// Adjust the height to match
return 1;