aboutsummaryrefslogtreecommitdiffstats
path: root/code/client/cl_cgame.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/client/cl_cgame.c')
-rw-r--r--code/client/cl_cgame.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/code/client/cl_cgame.c b/code/client/cl_cgame.c
index b53e304..b2a3cc4 100644
--- a/code/client/cl_cgame.c
+++ b/code/client/cl_cgame.c
@@ -387,7 +387,7 @@ CL_ShutdonwCGame
====================
*/
void CL_ShutdownCGame( void ) {
- cls.keyCatchers &= ~KEYCATCH_CGAME;
+ Key_SetCatcher( Key_GetCatcher( ) & ~KEYCATCH_CGAME );
cls.cgameStarted = qfalse;
if ( !cgvm ) {
return;
@@ -607,7 +607,8 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) {
case CG_KEY_GETCATCHER:
return Key_GetCatcher();
case CG_KEY_SETCATCHER:
- Key_SetCatcher( args[1] );
+ // Don't allow the cgame module to close the console
+ Key_SetCatcher( args[1] | ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) );
return 0;
case CG_KEY_GETKEY:
return Key_GetKey( VMA(1) );