diff options
Diffstat (limited to 'dinput/keybinding-worker.cpp')
-rw-r--r-- | dinput/keybinding-worker.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp index 91b02428..fc30bcd3 100644 --- a/dinput/keybinding-worker.cpp +++ b/dinput/keybinding-worker.cpp @@ -15,7 +15,7 @@ #include <QDebug> #include <QMutexLocker> -#include <windows.h> +#include <dinput.h> Key::Key() = default; @@ -153,6 +153,8 @@ bool KeybindingWorker::run_keyboard_nolock() if (!di_t::poll_device(dinkeyboard)) eval_once(qDebug() << "dinput: keyboard poll failed"); + DIDEVICEOBJECTDATA keyboard_states[num_keyboard_states] = {}; + DWORD sz = num_keyboard_states; HRESULT hr = dinkeyboard->GetDeviceData(sizeof(*keyboard_states), keyboard_states, &sz, 0); |