summaryrefslogtreecommitdiffhomepage
path: root/dinput
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-05-12 15:43:50 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-05-12 15:48:16 +0200
commit4c4c783d023cf1bb6a8d7d883bf8d3384f7b7da1 (patch)
treeeb81974538149ce053d923991eaeebe2a2da3d9e /dinput
parent8cb6d9d0a5aa617d0d9922ea26f0c98df27b5f1e (diff)
minor fixes only
Diffstat (limited to 'dinput')
-rw-r--r--dinput/keybinding-worker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp
index b94b762e..0e16ac71 100644
--- a/dinput/keybinding-worker.cpp
+++ b/dinput/keybinding-worker.cpp
@@ -9,6 +9,7 @@
#ifdef _WIN32
#include "keybinding-worker.hpp"
+#include "compat/util.hpp"
#include <functional>
#include <windows.h>
#include <QDebug>
@@ -18,8 +19,8 @@ bool Key::should_process()
{
if (!enabled || (keycode == 0 && guid == ""))
return false;
- bool ret = !held || timer.elapsed_ms() > 100;
- timer.start();
+ bool ret = prog1(!held || timer.elapsed_ms() > 100,
+ timer.start());
return ret;
}