summaryrefslogtreecommitdiffhomepage
path: root/opentrack/keybinding-worker.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack/keybinding-worker.hpp')
-rw-r--r--opentrack/keybinding-worker.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/opentrack/keybinding-worker.hpp b/opentrack/keybinding-worker.hpp
index e720ffdc..8cf59d65 100644
--- a/opentrack/keybinding-worker.hpp
+++ b/opentrack/keybinding-worker.hpp
@@ -15,6 +15,7 @@
#endif
#include "opentrack-compat/timer.hpp"
+#include "opentrack/win32-joystick-shortcuts.hpp"
#include <QThread>
#include <QMutex>
#include <QWidget>
@@ -27,6 +28,7 @@
# include <dinput.h>
struct Key {
BYTE keycode;
+ QString guid;
bool shift;
bool ctrl;
bool alt;
@@ -38,7 +40,7 @@ public:
bool should_process()
{
- if (keycode == 0)
+ if (keycode == 0 && guid == "")
return false;
bool ret = timer.elapsed_ms() > 100;
timer.start();
@@ -56,6 +58,7 @@ private:
LPDIRECTINPUT8 din;
LPDIRECTINPUTDEVICE8 dinkeyboard;
QMutex mtx;
+ win32_joy_ctx joy_ctx;
public:
volatile bool should_quit;
std::function<void(Key&)> receiver;