diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-01-25 17:57:53 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-01-25 17:57:53 +0000 |
commit | 8ab0b9c277ed99d93c2d5b76ceeb30078ac85f11 (patch) | |
tree | 553101d21e188e08f115cb8ebd8fb502b3ac4e05 /code/unix | |
parent | b07085058a2fd07241a9d3035de1442aa2a086ba (diff) | |
download | ioquake3-aero-8ab0b9c277ed99d93c2d5b76ceeb30078ac85f11.tar.gz ioquake3-aero-8ab0b9c277ed99d93c2d5b76ceeb30078ac85f11.zip |
* SDL build no longer requires a vid_restart when changing r_fullscreen
git-svn-id: svn://svn.icculus.org/quake3/trunk@526 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix')
-rw-r--r-- | code/unix/sdl_glimp.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/code/unix/sdl_glimp.c b/code/unix/sdl_glimp.c index 75dc010..db77e14 100644 --- a/code/unix/sdl_glimp.c +++ b/code/unix/sdl_glimp.c @@ -1040,6 +1040,34 @@ void GLimp_EndFrame (void) SDL_GL_SwapBuffers(); } + if( r_fullscreen->modified ) + { + qboolean fullscreen; + qboolean sdlToggled = qfalse; + SDL_Surface *s = SDL_GetVideoSurface( ); + + if( s ) + { + // Find out the current state + if( s->flags & SDL_FULLSCREEN ) + fullscreen = qtrue; + else + fullscreen = qfalse; + + // Is the state we want different from the current state? + if( !!r_fullscreen->integer != fullscreen ) + sdlToggled = SDL_WM_ToggleFullScreen( s ); + else + sdlToggled = qtrue; + } + + // SDL_WM_ToggleFullScreen didn't work, so do it the slow way + if( !sdlToggled ) + Cbuf_AddText( "vid_restart" ); + + r_fullscreen->modified = qfalse; + } + // check logging QGL_EnableLogging( (qboolean)r_logFile->integer ); // bk001205 - was ->value } |