From aac3d4b4578585b8b3f96685502f2941d492ee1a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 5 Sep 2016 22:09:37 +0200 Subject: {dinput,logic,..}: cleanup --- dinput/keybinding-worker.cpp | 7 ++++--- dinput/keybinding-worker.hpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'dinput') diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp index a67e8470..608f8fc1 100644 --- a/dinput/keybinding-worker.cpp +++ b/dinput/keybinding-worker.cpp @@ -88,8 +88,8 @@ KeybindingWorker& KeybindingWorker::make() void KeybindingWorker::run() { - BYTE keystate[256] = {0}; - BYTE old_keystate[256] = {0}; + unsigned char keystate[256] = {0}; + unsigned char old_keystate[256] = {0}; while (!should_quit) { @@ -101,7 +101,8 @@ void KeybindingWorker::run() { const HRESULT hr = dinkeyboard->GetDeviceState(256, (LPVOID)keystate); - if (hr != DI_OK) { + if (hr != DI_OK) + { qDebug() << "Tracker::run GetDeviceState function failed!" << GetLastError(); Sleep(25); continue; diff --git a/dinput/keybinding-worker.hpp b/dinput/keybinding-worker.hpp index c2d571f8..c4b441b8 100644 --- a/dinput/keybinding-worker.hpp +++ b/dinput/keybinding-worker.hpp @@ -23,8 +23,8 @@ struct OPENTRACK_DINPUT_EXPORT Key { - BYTE keycode; QString guid; + int keycode; bool shift; bool ctrl; bool alt; -- cgit v1.2.3