diff options
author | Zack Middleton <zturtleman@gmail.com> | 2014-05-19 03:37:59 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-08-28 11:03:33 +0100 |
commit | c3d4d0aa93f114b1d3ec92312d1c1f4e6e929e0d (patch) | |
tree | 30442a9d594f4b6624088d8faeca0fc2a9ccbc7d /src/sdl | |
parent | 93128472323d98f9902b280e2716874cfd0b2a05 (diff) |
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.
Diffstat (limited to 'src/sdl')
-rw-r--r-- | src/sdl/sdl_input.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sdl/sdl_input.c b/src/sdl/sdl_input.c index 19fbcaae..65bf0815 100644 --- a/src/sdl/sdl_input.c +++ b/src/sdl/sdl_input.c @@ -775,6 +775,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 ); |