Prevent divide by 0 when SDL_GetCurrentDisplayMode()/SDL_GetClosestDisplayMode() say the refresh rate is 0

git-svn-id: https://svn.eduke32.com/eduke32@6833 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-04-12 21:04:07 +00:00
parent 87d19d5cde
commit 1cb6ab9db1

View file

@ -1519,6 +1519,9 @@ void setrefreshrate(void)
SDL_SetWindowDisplayMode(sdl_window, &newmode);
}
if (!newmode.refresh_rate)
newmode.refresh_rate = 60;
currentVBlankInterval = 1000/newmode.refresh_rate;
}