summaryrefslogtreecommitdiffhomepage
path: root/dinput/keybinding-worker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dinput/keybinding-worker.cpp')
-rw-r--r--dinput/keybinding-worker.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp
index 468ef477..fec28a03 100644
--- a/dinput/keybinding-worker.cpp
+++ b/dinput/keybinding-worker.cpp
@@ -158,9 +158,9 @@ void KeybindingWorker::run()
default:
{
Key k;
- k.shift = !!((keystate[DIK_LSHIFT] & 0x80) | (keystate[DIK_RSHIFT] & 0x80));
- k.alt = !!((keystate[DIK_LALT] & 0x80) | (keystate[DIK_RALT] & 0x80));
- k.ctrl = !!((keystate[DIK_LCONTROL] & 0x80) | (keystate[DIK_RCONTROL] & 0x80));
+ k.shift = !!(keystate[DIK_LSHIFT] | keystate[DIK_RSHIFT]);
+ k.alt = !!(keystate[DIK_LALT] | keystate[DIK_RALT]);
+ k.ctrl = !!(keystate[DIK_LCONTROL] | keystate[DIK_RCONTROL]);
k.keycode = idx;
k.held = held;
@@ -180,9 +180,9 @@ void KeybindingWorker::run()
joy_fn f = [&](const QString& guid, int idx, bool held) {
Key k;
k.keycode = idx;
- k.shift = !!(keystate[DIK_LSHIFT] & 0x80 || keystate[DIK_RSHIFT] & 0x80);
- k.alt = !!(keystate[DIK_LALT] & 0x80 || keystate[DIK_RALT] & 0x80);
- k.ctrl = !!(keystate[DIK_LCONTROL] & 0x80 || keystate[DIK_RCONTROL] & 0x80);
+ k.shift = !!(keystate[DIK_LSHIFT] | keystate[DIK_RSHIFT]);
+ k.alt = !!(keystate[DIK_LALT] | keystate[DIK_RALT]);
+ k.ctrl = !!(keystate[DIK_LCONTROL] | keystate[DIK_RCONTROL]);
k.guid = guid;
k.held = held;