mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-14 16:01:44 +00:00
gl_vidsdl.c (VID_SetMode): If mode setting failed, error out before doing
anything else unnecessary in between. gl_vidnt.c (VID_SetMode): Likewise. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@147 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
fa0abdefdf
commit
6d761aafe8
2 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue