diff --git a/src/win32/win_vid.c b/src/win32/win_vid.c index a9dd097b3..cca7810b3 100644 --- a/src/win32/win_vid.c +++ b/src/win32/win_vid.c @@ -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;