diff --git a/quakespasm/Quake/gl_vidnt.c b/quakespasm/Quake/gl_vidnt.c index 77321a31..63bcbc32 100644 --- a/quakespasm/Quake/gl_vidnt.c +++ b/quakespasm/Quake/gl_vidnt.c @@ -576,6 +576,11 @@ int VID_SetMode (int modenum) Sys_Error ("VID_SetMode: Bad mode type in modelist"); } + if (!stat) + { + Sys_Error ("Couldn't set video mode"); + } + //johnfitz -- re-initialize dinput becuase it's tied to the "mainwindow" object if (COM_CheckParm ("-dinput")) IN_InitDInput (); @@ -588,11 +593,6 @@ int VID_SetMode (int modenum) CDAudio_Resume (); scr_disabled_for_loading = temp; - if (!stat) - { - Sys_Error ("Couldn't set video mode"); - } - // now we try to make sure we get the focus on the mode switch, because // sometimes in some systems we don't. We grab the foreground, then // finish setting up, pump all our messages, and sleep for a little while diff --git a/quakespasm/Quake/gl_vidsdl.c b/quakespasm/Quake/gl_vidsdl.c index de67fe11..cdb59425 100644 --- a/quakespasm/Quake/gl_vidsdl.c +++ b/quakespasm/Quake/gl_vidsdl.c @@ -308,6 +308,11 @@ int VID_SetMode (int modenum) Sys_Error ("VID_SetMode: Bad mode type in modelist"); } + if (!stat) + { + Sys_Error ("Couldn't set video mode"); + } + //kristian -- set window caption sprintf(caption, "QuakeSpasm %1.2f.%d", (float)FITZQUAKE_VERSION, QUAKESPASM_VER_PATCH); SDL_WM_SetCaption((const char* )&caption, (const char*)&caption); @@ -324,11 +329,6 @@ int VID_SetMode (int modenum) CDAudio_Resume (); scr_disabled_for_loading = temp; - if (!stat) - { - Sys_Error ("Couldn't set video mode"); - } - vid_modenum = modenum; // fix the leftover Alt from any Alt-Tab or the like that switched us away