mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Don't try videoSetGameMode() if there aren't any valid modes
git-svn-id: https://svn.eduke32.com/eduke32@8207 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
215a7cdff3
commit
b8f4651ab4
1 changed files with 2 additions and 2 deletions
|
@ -6644,7 +6644,7 @@ int app_main(int argc, char const * const * argv)
|
|||
|
||||
if (quitevent) return 4;
|
||||
|
||||
if (g_networkMode != NET_DEDICATED_SERVER)
|
||||
if (g_networkMode != NET_DEDICATED_SERVER && validmodecnt > 0)
|
||||
{
|
||||
if (videoSetGameMode(ud.setup.fullscreen, ud.setup.xdim, ud.setup.ydim, ud.setup.bpp, ud.detail) < 0)
|
||||
{
|
||||
|
@ -6670,7 +6670,7 @@ int app_main(int argc, char const * const * argv)
|
|||
initprintf("Failure setting video mode %dx%dx%d windowed! Trying next mode...\n",
|
||||
validmode[resIdx].xdim, validmode[resIdx].ydim, bpp);
|
||||
|
||||
if (++resIdx == validmodecnt)
|
||||
if (++resIdx >= validmodecnt)
|
||||
{
|
||||
if (bpp == 8)
|
||||
G_GameExit("Fatal error: unable to set any video mode!");
|
||||
|
|
Loading…
Reference in a new issue