summaryrefslogtreecommitdiffhomepage
path: root/dinput
diff options
context:
space:
mode:
Diffstat (limited to 'dinput')
-rw-r--r--dinput/keybinding-worker.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp
index 0e16ac71..71ab6d9c 100644
--- a/dinput/keybinding-worker.cpp
+++ b/dinput/keybinding-worker.cpp
@@ -134,7 +134,7 @@ void KeybindingWorker::run()
Key k;
if (old_keystate[i] != keystate[i])
{
- const bool held = keystate[i] & 0x80;
+ const bool held = !!(keystate[i] & 0x80);
switch (i)
{
case DIK_LCONTROL:
@@ -145,14 +145,14 @@ void KeybindingWorker::run()
case DIK_RALT:
break;
default:
- 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] & 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.keycode = i;
k.held = held;
for (auto& r : receivers)
- r->operator()(k);
+ r(k);
break;
}
}