Tim Schumacher : dinput: Map wheel, gas, and brake axes as well.
Alexandre Julliard
julliard at winehq.org
Wed May 1 16:37:06 CDT 2019
Module: wine
Branch: master
Commit: 1a6458bad8191a8188d76ba21b38ef457bfe1295
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1a6458bad8191a8188d76ba21b38ef457bfe1295
Author: Tim Schumacher <timschumi at gmx.de>
Date: Sun Mar 31 13:09:43 2019 +0200
dinput: Map wheel, gas, and brake axes as well.
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 at gmx.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 736a06e..f93fc2f 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)
{
More information about the wine-cvs
mailing list