mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
sdl2: Ignore key-repeats events.
Fixes keyboard input during gameplay.
This commit is contained in:
parent
65b1a7dc3b
commit
851f47537b
@ -355,6 +355,7 @@ int sdlKeyFilter(const SDL_Event *event) {
|
||||
|
||||
switch (event->key.state) {
|
||||
case SDL_PRESSED:
|
||||
if (event->key.repeat) break; // ignore these, we only want to know if it's a first time pressed, not a key-repeat.
|
||||
kc = sdlkeycode_to_keycode(event->key.keysym.sym);
|
||||
if (event->key.keysym.mod & KMOD_CTRL) {
|
||||
switch (kc) {
|
||||
|
Loading…
Reference in New Issue
Block a user