aboutsummaryrefslogtreecommitdiffstats
path: root/code/client/cl_keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/client/cl_keys.c')
-rw-r--r--code/client/cl_keys.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/code/client/cl_keys.c b/code/client/cl_keys.c
index a14b5ce..6f0dece 100644
--- a/code/client/cl_keys.c
+++ b/code/client/cl_keys.c
@@ -1043,28 +1043,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