From 91160a1142e8564f3ba46a71d86dc88dcbd66114 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 29 Jun 2016 13:09:28 +0200 Subject: 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. --- opentrack-logic/win32-joystick.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'opentrack-logic/win32-joystick.hpp') 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(); -- cgit v1.2.3