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:
Zack Middleton 2014-05-19 03:37:59 -05:00
parent cfcd2d2d7f
commit 6a33a69795

View file

@ -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 );