diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-29 13:09:28 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-29 13:18:33 +0200 |
commit | 91160a1142e8564f3ba46a71d86dc88dcbd66114 (patch) | |
tree | 2008fd69739875ed017cb95c49b747081dd96c6e /opentrack-logic/win32-joystick.hpp | |
parent | 7e5fae3f4b8de73894e811e7a282d9175e3ab970 (diff) |
logic/joystick: treat each POV hat as 4 buttons
dinput8 has separate logic for pov hats. Before pov hat state was
totally ignored.
Don't support 8-way buttons. Only one button gets registered after a
diagonal pov hat press.
Diffstat (limited to 'opentrack-logic/win32-joystick.hpp')
-rw-r--r-- | opentrack-logic/win32-joystick.hpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/opentrack-logic/win32-joystick.hpp b/opentrack-logic/win32-joystick.hpp index ac592a54..0da5554b 100644 --- a/opentrack-logic/win32-joystick.hpp +++ b/opentrack-logic/win32-joystick.hpp @@ -42,9 +42,8 @@ struct OPENTRACK_LOGIC_EXPORT win32_joy_ctx { LPDIRECTINPUTDEVICE8 joy_handle; QString guid, name; - bool pressed[128]; + bool pressed[128 + 4 * 4]; Timer first_timer; - DIJOYSTATE2 js_old; joy(LPDIRECTINPUTDEVICE8 handle, const QString& guid, const QString& name); ~joy(); |