mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Added revert of patch which assumes a 1-to-1 axes mapping when no axes match.
This commit is contained in:
parent
22731b5aaa
commit
af8052189f
@ -0,0 +1,55 @@
|
||||
From 0eb3047ec54504764bc6c860fecb465815bb8597 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 12 Jun 2017 20:07:24 +0200
|
||||
Subject: Revert "dinput: Assume a 1-to-1 axes map when no axes match."
|
||||
|
||||
This reverts commit e87ccb8b055dc846211967e46ee2f17fbabef7a1.
|
||||
---
|
||||
dlls/dinput/joystick_linux.c | 19 +------------------
|
||||
1 file changed, 1 insertion(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
|
||||
index 1032659621e..1f8f94d7382 100644
|
||||
--- a/dlls/dinput/joystick_linux.c
|
||||
+++ b/dlls/dinput/joystick_linux.c
|
||||
@@ -228,36 +228,19 @@ static INT find_joystick_devices(void)
|
||||
else
|
||||
if ((joydev.dev_axes_map = HeapAlloc(GetProcessHeap(), 0, joydev.axis_count * sizeof(int))))
|
||||
{
|
||||
- INT j, found_axes = 0;
|
||||
+ INT j;
|
||||
|
||||
/* Remap to DI numbers */
|
||||
for (j = 0; j < joydev.axis_count; j++)
|
||||
- {
|
||||
if (axes_map[j] < 8)
|
||||
- {
|
||||
/* Axis match 1-to-1 */
|
||||
joydev.dev_axes_map[j] = j;
|
||||
- found_axes++;
|
||||
- }
|
||||
else if (axes_map[j] == 16 ||
|
||||
axes_map[j] == 17)
|
||||
- {
|
||||
/* POV axis */
|
||||
joydev.dev_axes_map[j] = 8;
|
||||
- found_axes++;
|
||||
- }
|
||||
else
|
||||
joydev.dev_axes_map[j] = -1;
|
||||
- }
|
||||
-
|
||||
- /* If no axes were configured but there are axes assume a 1-to-1 (wii controller) */
|
||||
- if (joydev.axis_count && !found_axes)
|
||||
- {
|
||||
- ERR("Incoherent joystick data, advertised %d axes, detected 0. Assuming 1-to-1.\n",
|
||||
- joydev.axis_count);
|
||||
- for (j = 0; j < joydev.axis_count; j++)
|
||||
- joydev.dev_axes_map[j] = j;
|
||||
- }
|
||||
}
|
||||
|
||||
/* Find vendor_id and product_id in sysfs */
|
||||
--
|
||||
2.13.1
|
||||
|
1
patches/dinput-Revert_Joystick_Hack/definition
Normal file
1
patches/dinput-Revert_Joystick_Hack/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [!43120] Revert patch to assume a 1-to-1 axes mapping when no axes match
|
@ -147,6 +147,7 @@ patch_enable_all ()
|
||||
enable_ddraw_Write_Vtable="$1"
|
||||
enable_devenum_AudioCompressorCategory="$1"
|
||||
enable_dinput_Initialize="$1"
|
||||
enable_dinput_Revert_Joystick_Hack="$1"
|
||||
enable_dmloader_Tests="$1"
|
||||
enable_dsound_EAX="$1"
|
||||
enable_dsound_Fast_Mixer="$1"
|
||||
@ -684,6 +685,9 @@ patch_enable ()
|
||||
dinput-Initialize)
|
||||
enable_dinput_Initialize="$2"
|
||||
;;
|
||||
dinput-Revert_Joystick_Hack)
|
||||
enable_dinput_Revert_Joystick_Hack="$2"
|
||||
;;
|
||||
dmloader-Tests)
|
||||
enable_dmloader_Tests="$2"
|
||||
;;
|
||||
@ -4181,6 +4185,21 @@ if test "$enable_dinput_Initialize" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset dinput-Revert_Joystick_Hack
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#43120] Revert patch to assume a 1-to-1 axes mapping when no axes match
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/dinput/joystick_linux.c
|
||||
# |
|
||||
if test "$enable_dinput_Revert_Joystick_Hack" -eq 1; then
|
||||
patch_apply dinput-Revert_Joystick_Hack/0001-Revert-dinput-Assume-a-1-to-1-axes-map-when-no-axes-.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "Revert \"dinput: Assume a 1-to-1 axes map when no axes match.\".", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset dmloader-Tests
|
||||
# |
|
||||
# | Modified files:
|
||||
|
Loading…
Reference in New Issue
Block a user