Rebase against 16e73be10d940c9c04101a47687a6f8a385c2b0f.

This commit is contained in:
Zebediah Figura
2021-09-17 17:45:25 -05:00
parent 3a06c15dd2
commit fdcc8bec48
9 changed files with 105 additions and 105 deletions

View File

@@ -1,4 +1,4 @@
From 2c404d618908f4655623611ce720b6b27d0c1de6 Mon Sep 17 00:00:00 2001
From 7d5631535b26bea474584a75254da6d91e623e4f 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
@@ -18,10 +18,10 @@ Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815
5 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 2354ff3b822..36086f0035f 100644
index d4f5b819471..e1fc80f41bf 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -1034,6 +1034,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
@@ -883,6 +883,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
int tokens = 0;
int axis = 0;
int pov = 0;
@@ -29,7 +29,7 @@ index 2354ff3b822..36086f0035f 100644
get_app_key(&hkey, &appkey);
@@ -1045,6 +1046,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
@@ -894,6 +895,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
TRACE("setting default deadzone to: \"%s\" %d\n", buffer, This->deadzone);
}
@@ -65,10 +65,10 @@ index 2354ff3b822..36086f0035f 100644
if (!This->axis_map) return DIERR_OUTOFMEMORY;
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
index ec4cb94c034..7dc9deff8c4 100644
index c439cca81c3..d1194197f66 100644
--- a/dlls/dinput/joystick_linux.c
+++ b/dlls/dinput/joystick_linux.c
@@ -856,10 +856,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
@@ -735,10 +735,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
jse.type,jse.number,jse.value);
if (jse.type & JS_EVENT_BUTTON)
{
@@ -85,10 +85,10 @@ index ec4cb94c034..7dc9deff8c4 100644
else if (jse.type & JS_EVENT_AXIS)
{
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index ef7b160ba58..7830cce3ced 100644
index 8279ffbf74a..a6a658ac57b 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -908,6 +908,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
@@ -742,6 +742,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
if (btn & 0x80)
{
btn &= 0x7F;
@@ -98,10 +98,10 @@ index ef7b160ba58..7830cce3ced 100644
This->generic.js.rgbButtons[btn] = value = ie.value ? 0x80 : 0x00;
}
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
index 174a78b7fd4..60e3967d921 100644
index e8732bd696c..866df41c392 100644
--- a/dlls/dinput/joystick_osx.c
+++ b/dlls/dinput/joystick_osx.c
@@ -844,6 +844,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
@@ -838,6 +838,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal);
if (oldVal != newVal)
{
@@ -109,9 +109,9 @@ index 174a78b7fd4..60e3967d921 100644
+
inst_id = DIDFT_MAKEINSTANCE(button_idx) | DIDFT_PSHBUTTON;
queue_event(iface,inst_id,newVal,GetCurrentTime(),device->generic.base.dinput->evsequence++);
}
if (device->generic.base.hEvent)
diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h
index 0f191787158..606475759ef 100644
index 4fe51d17067..01b35fa40fc 100644
--- a/dlls/dinput/joystick_private.h
+++ b/dlls/dinput/joystick_private.h
@@ -33,6 +33,9 @@
@@ -133,5 +133,5 @@ index 0f191787158..606475759ef 100644
joy_polldev_handler *joy_polldev;
--
2.30.2
2.33.0