mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
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:
parent
87d19d5cde
commit
1cb6ab9db1
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue