mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-14 00:50:38 +00:00
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:
parent
eb09523d00
commit
f6d96cf7e9
1 changed files with 6 additions and 0 deletions
|
@ -1367,6 +1367,8 @@ void VID_Toggle (void)
|
||||||
goto vrestart;
|
goto vrestart;
|
||||||
if (SDL_WM_ToggleFullScreen(draw_context) == 1)
|
if (SDL_WM_ToggleFullScreen(draw_context) == 1)
|
||||||
{
|
{
|
||||||
|
qboolean was_changed = vid_changed;
|
||||||
|
|
||||||
Sbar_Changed (); // Sbar seems to need refreshing
|
Sbar_Changed (); // Sbar seems to need refreshing
|
||||||
windowed = !windowed;
|
windowed = !windowed;
|
||||||
if (vid.type == MODE_FULLSCREEN_DEFAULT)
|
if (vid.type == MODE_FULLSCREEN_DEFAULT)
|
||||||
|
@ -1374,7 +1376,11 @@ void VID_Toggle (void)
|
||||||
else
|
else
|
||||||
vid.type = MODE_FULLSCREEN_DEFAULT;
|
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");
|
Cvar_SetQuick (&vid_fullscreen, vid_fullscreen.value ? "0" : "1");
|
||||||
|
vid_changed = was_changed;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue