aboutsummaryrefslogtreecommitdiffstats
path: root/code/client/cl_cgame.c
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-10-02 14:14:45 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-10-02 14:14:45 +0000
commit6bf8f279665d5d006159fb9fc180984c644ed875 (patch)
tree89d03c71398ee4e20b2b9b08bbe4f565074a904f /code/client/cl_cgame.c
parent89f707ad9cefdebda05d6f019f584be159f740a7 (diff)
downloadioquake3-aero-6bf8f279665d5d006159fb9fc180984c644ed875.tar.gz
ioquake3-aero-6bf8f279665d5d006159fb9fc180984c644ed875.zip
* 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
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) );