Updated dinput-remap-joystick patchset

This commit is contained in:
Alistair Leslie-Hughes 2019-03-18 10:03:40 +11:00
parent b6787bc221
commit 4c19e3f8e1

View File

@ -1,4 +1,4 @@
From 0ea096d60ff87cbab644fce6b2115be749b28e51 Mon Sep 17 00:00:00 2001
From bf98a453bb814564ccf848d76d06c4b544cfa998 Mon Sep 17 00:00:00 2001
From: Andrew Church <achurch@achurch.org>
Date: Mon, 25 Feb 2019 11:21:03 +1100
Subject: [PATCH] dinput: Allow remapping of joystick buttons
@ -6,6 +6,7 @@ Subject: [PATCH] dinput: Allow remapping of joystick buttons
Changed
- Change the array to store the origial button.
- Remove lookup loops.
- Changed max Buttons to 32 to match DIJOYSTATE structure.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815
---
@ -110,7 +111,7 @@ index 0701b9f..224e203 100644
queue_event(iface,inst_id,newVal,GetCurrentTime(),device->generic.base.dinput->evsequence++);
}
diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h
index e758cac..8b4f203 100644
index e758cac..4a382c2 100644
--- a/dlls/dinput/joystick_private.h
+++ b/dlls/dinput/joystick_private.h
@@ -33,6 +33,9 @@
@ -118,7 +119,7 @@ index e758cac..8b4f203 100644
struct JoystickGenericImpl;
+/* Number of buttons for which to allow remapping */
+#define MAX_MAP_BUTTONS 16
+#define MAX_MAP_BUTTONS 32
+
typedef void joy_polldev_handler(LPDIRECTINPUTDEVICE8A iface);