gl_vidsdl.c (VID_Toggle): if SDL_WM_ToggleFullScreen() succeeded, ignore

the vid_fullscreen callback function setting vid_changed to true.

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@577 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2011-12-29 21:44:36 +00:00
parent b7bbda4c94
commit a653822538
1 changed files with 6 additions and 0 deletions

View File

@ -1367,6 +1367,8 @@ void VID_Toggle (void)
goto vrestart;
if (SDL_WM_ToggleFullScreen(draw_context) == 1)
{
qboolean was_changed = vid_changed;
Sbar_Changed (); // Sbar seems to need refreshing
windowed = !windowed;
if (vid.type == MODE_FULLSCREEN_DEFAULT)
@ -1374,7 +1376,11 @@ void VID_Toggle (void)
else
vid.type = MODE_FULLSCREEN_DEFAULT;
// since we succeeded, ignore the vid_fullscreen
// callback function setting vid_changed to true.
was_changed = vid_changed;
Cvar_SetQuick (&vid_fullscreen, vid_fullscreen.value ? "0" : "1");
vid_changed = was_changed;
}
else
{