summaryrefslogtreecommitdiffhomepage
path: root/dinput/keybinding-worker.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-01-13 14:14:20 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-01-13 14:24:05 +0100
commite0f0353dd5314d7836a7d3030e4895865f2e62ff (patch)
tree66a53ed743f36c1840c035841c80c42e55534f7f /dinput/keybinding-worker.cpp
parentc6cdf9cfc701b5c9f02f37178b8364abd0bf4d93 (diff)
dinput: don't include <windows.h> in headers
Issue: #583
Diffstat (limited to 'dinput/keybinding-worker.cpp')
-rw-r--r--dinput/keybinding-worker.cpp4
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);