diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-05-05 21:18:52 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-05-05 21:18:52 +0000 |
commit | 0bd55fbf794d11385bcc64b01b81e8e478295bad (patch) | |
tree | ab548c3ad37fc13c555a5cca9da4348f3e35d84c /source/cl_keys.c | |
parent | 49e6170b49fbb933eddec6d0e3f946320c68832f (diff) |
Brought SDL window resizing policy in compliance to ICCCM.
Renamed `vid_placement' cvar to `vid_geometry'.
Load *.pkz files by default.
Do not allow backed-up quake paths at all.
Apply `--enable-dsound' and `--enable-dinput' options to Unix too.
Replaced `s_driver' and `in_driver' cvars with `s_direct' and `in_direct'.
Renamed `s_initsound' cva to `s_enable'.
Improved SDL input grabs handling in windowed mode.
Allow `cl_noskins' to be dynamically changed.
Run client at 10 fps if minimuzed, at 60 fps if not active
(client is disconnected or in background).
Fixed Sys_ExecDefault.
Use absolute mouse positioning for UI.
Hide custom UI cursor in windowed mode.
Diffstat (limited to 'source/cl_keys.c')
-rw-r--r-- | source/cl_keys.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/source/cl_keys.c b/source/cl_keys.c index 4539bb6..82d920a 100644 --- a/source/cl_keys.c +++ b/source/cl_keys.c @@ -213,8 +213,14 @@ Key_SetDest =================== */ void Key_SetDest( keydest_t dest ) { - int diff = cls.key_dest ^ dest; + int diff; +// make sure at least fullscreen console or main menu is up + if( cls.state == ca_disconnected && !( dest & (KEY_MENU|KEY_CONSOLE) ) ) { + dest |= KEY_CONSOLE; + } + + diff = cls.key_dest ^ dest; if( diff & KEY_CONSOLE ) { if( dest & KEY_CONSOLE ) { // release all keys, to keep the character from continuing an @@ -237,7 +243,7 @@ void Key_SetDest( keydest_t dest ) { // activate or deactivate mouse if( diff & (KEY_CONSOLE|KEY_MENU) ) { - CL_InputActivate(); + IN_Activate(); } } @@ -662,6 +668,8 @@ void Key_Event( unsigned key, qboolean down, unsigned time ) { Com_Error( ERR_FATAL, "%s: bad key", __func__ ); } + //Com_Printf("%s: %d\n",Key_KeynumToString(key),down); + // hack for modal presses if( key_waiting == -1 ) { if( down ) @@ -681,7 +689,7 @@ void Key_Event( unsigned key, qboolean down, unsigned time ) { && key != K_KP_PGDN && key_repeats[key] > 1 ) { - return; // ignore most autorepeats + return; // ignore most autorepeats } if( key >= 200 && !keybindings[key] && !consolekeys[key] ) { @@ -703,9 +711,9 @@ void Key_Event( unsigned key, qboolean down, unsigned time ) { // Alt+Enter is hardcoded for all systems if( keydown[K_ALT] && key == K_ENTER ) { if( down ) { - extern void Video_ToggleFullscreen( void ); + extern void VID_ToggleFullscreen( void ); - Video_ToggleFullscreen(); + VID_ToggleFullscreen(); } return; } @@ -840,7 +848,7 @@ void Key_Event( unsigned key, qboolean down, unsigned time ) { #ifndef USE_CHAR_EVENTS if( keydown[K_CTRL] || keydown[K_ALT] ) { - return; + // return; } switch( key ) { |