From 6bf8f279665d5d006159fb9fc180984c644ed875 Mon Sep 17 00:00:00 2001 From: tma Date: Tue, 2 Oct 2007 14:14:45 +0000 Subject: * Fix bug that prevented key up events getting to cgame/ui when not in game * Use Key_[GS]etCatcher everywhere to set keycatcher * Clear all key states when the catcher changes git-svn-id: svn://svn.icculus.org/quake3/trunk@1189 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/client/cl_cgame.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'code/client/cl_cgame.c') 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) ); -- cgit v1.2.3