* 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
This commit is contained in:
parent
26641226a4
commit
5692e30fa9
9 changed files with 79 additions and 71 deletions
|
@ -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) );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue