diff options
author | Tim Angus <tim@ngus.net> | 2006-01-27 19:50:12 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2006-01-27 19:50:12 +0000 |
commit | dfff1857ce0517dec0c67c59eed9bab0a4d55e25 (patch) | |
tree | 10d227310c61eb1fc6e0cddbd8bb9ec847918cb6 /src/client/cl_keys.c | |
parent | c106cea01560ffc77938d6cb3d9239250828c8d5 (diff) |
* Merged ioq3-r529
- Quick fullscreen changes
- Fix to that server crashing memory leak
- Some FreeBSD changes
* Default for r_znear changed
Diffstat (limited to 'src/client/cl_keys.c')
-rw-r--r-- | src/client/cl_keys.c | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/src/client/cl_keys.c b/src/client/cl_keys.c index 232f04a4..a0d4e065 100644 --- a/src/client/cl_keys.c +++ b/src/client/cl_keys.c @@ -1044,28 +1044,22 @@ void CL_KeyEvent (int key, qboolean down, unsigned time) { } #ifndef _WIN32 - if (key == K_ENTER) - { - if (down) - { - if (keys[K_ALT].down) - { - Key_ClearStates(); - if (Cvar_VariableValue("r_fullscreen") == 0) - { - Com_Printf("Switching to fullscreen rendering\n"); - Cvar_Set("r_fullscreen", "1"); - } - else - { - Com_Printf("Switching to windowed rendering\n"); - Cvar_Set("r_fullscreen", "0"); - } - Cbuf_ExecuteText( EXEC_APPEND, "vid_restart\n"); - return; - } - } - } + if (key == K_ENTER) + { + if (down) + { + if (keys[K_ALT].down) + { + Key_ClearStates(); + Cvar_SetValue( "r_fullscreen", + !Cvar_VariableIntegerValue( "r_fullscreen" ) ); +#if !USE_SDL_VIDEO // This is handled in sdl_glimp.c/GLimp_EndFrame + Cbuf_ExecuteText( EXEC_APPEND, "vid_restart\n"); +#endif + return; + } + } + } #endif // console key is hardcoded, so the user can never unbind it |