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

the vid_fullscreen callback function setting vid_changed to true.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@577 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2011-12-29 21:44:36 +00:00
parent eb09523d00
commit f6d96cf7e9

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
{