diff options
Diffstat (limited to 'dinput')
-rw-r--r-- | dinput/keybinding-worker.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp index 5acdc65a..02036352 100644 --- a/dinput/keybinding-worker.cpp +++ b/dinput/keybinding-worker.cpp @@ -218,6 +218,10 @@ bool KeybindingWorker::run_keyboard_nolock() const int idx = keyboard_states[k].dwOfs & 0xff; // defensive programming const bool held = !!(keyboard_states[k].dwData & 0x80); + if (held == keystate[idx]) + continue; + keystate[idx] = held; + switch (idx) { case DIK_LCONTROL: @@ -243,8 +247,6 @@ bool KeybindingWorker::run_keyboard_nolock() } break; } - - keystate[idx] = held; } return true; |