[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH] dinput: Map wheel, gas, and brake axes as well
From: Tim Schumacher <timschumi () gmx ! de>
Date: 2019-03-31 11:02:26
Message-ID: 20190331110227.18757-1-timschumi () gmx ! de
[Download RAW message or body]
The axes wheel, gas, and brake are just differently named replacements
for X, Y, and Z when using wheel-like joysticks.
Make those accessible by remapping them to X, Y, and Z internally.
Signed-off-by: Tim Schumacher <timschumi@gmx.de>
---
dlls/dinput/joystick_linux.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
index 628674644e..d1e9d43470 100644
--- a/dlls/dinput/joystick_linux.c
+++ b/dlls/dinput/joystick_linux.c
@@ -239,6 +239,14 @@ static INT find_joystick_devices(void)
joydev.dev_axes_map[j] = j;
found_axes++;
}
+ else if (axes_map[j] <= 10)
+ {
+ /* Axes 8 through 10 are Wheel, Gas and Brake,
+ * remap to 0, 1 and 2
+ */
+ joydev.dev_axes_map[j] = axes_map[j] - 8;
+ found_axes++;
+ }
else if (axes_map[j] == 16 ||
axes_map[j] == 17)
{
--
2.21.0
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic