aboutsummaryrefslogtreecommitdiffstats
path: root/code/client/cl_ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/client/cl_ui.c')
-rw-r--r--code/client/cl_ui.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/code/client/cl_ui.c b/code/client/cl_ui.c
index ccfc39d..31b938a 100644
--- a/code/client/cl_ui.c
+++ b/code/client/cl_ui.c
@@ -664,27 +664,6 @@ static void Key_GetBindingBuf( int keynum, char *buf, int buflen ) {
/*
====================
-Key_GetCatcher
-====================
-*/
-int Key_GetCatcher( void ) {
- return cls.keyCatchers;
-}
-
-/*
-====================
-Ket_SetCatcher
-====================
-*/
-void Key_SetCatcher( int catcher ) {
- // prevent console from being closed
- catcher |= cls.keyCatchers & KEYCATCH_CONSOLE;
- cls.keyCatchers = catcher;
-}
-
-
-/*
-====================
CLUI_GetCDKey
====================
*/
@@ -932,7 +911,8 @@ intptr_t CL_UISystemCalls( intptr_t *args ) {
return Key_GetCatcher();
case UI_KEY_SETCATCHER:
- Key_SetCatcher( args[1] );
+ // Don't allow the ui module to close the console
+ Key_SetCatcher( args[1] | ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) );
return 0;
case UI_GETCLIPBOARDDATA:
@@ -1124,7 +1104,7 @@ CL_ShutdownUI
====================
*/
void CL_ShutdownUI( void ) {
- cls.keyCatchers &= ~KEYCATCH_UI;
+ Key_SetCatcher( Key_GetCatcher( ) & ~KEYCATCH_UI );
cls.uiStarted = qfalse;
if ( !uivm ) {
return;