From 119671e4e7f4dc07c1fb20eb999a0a7fcfbbdba8 Mon Sep 17 00:00:00 2001
From: Stanislaw Halik <sthalik@misaki.pl>
Date: Sun, 22 Nov 2015 15:50:46 +0100
Subject: api/shortcuts, tracker/joy: adapt to synchronized joy api

---
 opentrack/keybinding-worker.cpp | 2 +-
 opentrack/keybinding-worker.hpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'opentrack')

diff --git a/opentrack/keybinding-worker.cpp b/opentrack/keybinding-worker.cpp
index d876d5a1..5f42f44e 100644
--- a/opentrack/keybinding-worker.cpp
+++ b/opentrack/keybinding-worker.cpp
@@ -27,7 +27,7 @@ KeybindingWorker::~KeybindingWorker() {
         din->Release();
 }
 
-KeybindingWorker::KeybindingWorker() : should_quit(true)
+KeybindingWorker::KeybindingWorker() : joy_ctx(win32_joy_ctx::make()), should_quit(true)
 {
     if (DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&din, NULL) != DI_OK) {
         qDebug() << "setup DirectInput8 Creation failed!" << GetLastError();
diff --git a/opentrack/keybinding-worker.hpp b/opentrack/keybinding-worker.hpp
index 5a73b1b1..551be144 100644
--- a/opentrack/keybinding-worker.hpp
+++ b/opentrack/keybinding-worker.hpp
@@ -59,7 +59,7 @@ struct OPENTRACK_EXPORT KeybindingWorker : private QThread
 private:
     LPDIRECTINPUT8 din;
     LPDIRECTINPUTDEVICE8 dinkeyboard;
-    win32_joy_ctx joy_ctx;
+    win32_joy_ctx& joy_ctx;
     volatile bool should_quit;
     using fun = std::function<void(Key&)>;
     std::vector<fun> receivers;
-- 
cgit v1.2.3