mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 14:41:42 +00:00
Disable key repeat if key catcher is 0
SDL1.2 branch disables key repeat when key catcher is 0. Presumably to prevent binds from executing multiple times. SDL2 replaced being able to disabled key repeat using SDL_EnableKeyRepeat with a non-zero repeat value in the key event.
This commit is contained in:
parent
cfcd2d2d7f
commit
6a33a69795
1 changed files with 3 additions and 0 deletions
|
@ -726,6 +726,9 @@ static void IN_ProcessEvents( void )
|
|||
switch( e.type )
|
||||
{
|
||||
case SDL_KEYDOWN:
|
||||
if ( e.key.repeat && Key_GetCatcher( ) == 0 )
|
||||
break;
|
||||
|
||||
if( ( key = IN_TranslateSDLToQ3Key( &e.key.keysym, qtrue ) ) )
|
||||
Com_QueueEvent( 0, SE_KEY, key, qtrue, 0, NULL );
|
||||
|
||||
|
|
Loading…
Reference in a new issue