https://bugs.winehq.org/show_bug.cgi?id=40658
Paul geoff.pvgn1@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |geoff.pvgn1@gmail.com
--- Comment #10 from Paul geoff.pvgn1@gmail.com --- Hi. Ran into this apparently old issue after dusting off a T.Flight Hotas X from Thrustmaster. Same exact behavior with the hat switch through the js0 interface as described above.
Present in vanilla wine 5.0.3 and 6.3 in Gentoo, in 32 and 64 bit clean prefixes.
In game (tested in Everspace) and in wine control panel, the joystick's event interface (/dev/input/event8) registers proper cardinal directions for the hat switch. Switching to the js interface (/dev/input/js0), the hat switch's X and Y axes are swapped. As a fix, I can swap the mapping in jstest-gtk, and js0 will behave properly in wine. Not ideal, since I'd be swapping it back and forth.
My preference for the js0 interface is because I can adjust deadzones through jstest-gtk and jscal. The counterpart event program "evdev-joystick" doesn't seem to actually affect the deadzone.
I'd pursue the event program's issues, but since js0 works fine outside of wine, I'd consider this issue an easier bridge to cross.
The joystick has seven axes (identified in jscal as 0, 1, 2, 5, 6, 16, 17) , including the two representing the single hat switch on it. The hat axes are 16 (x axis) and 17 (y axis).
I can successfully remap axes on the joystick through instructions at: https://wiki.winehq.org/Useful_Registry_Keys However, it doesn't affect the hat switch's orientation.
I patched wine 6.3, using the patch here as a base, and it fixed the hat switch cardinals. According to comment #5 it looks like it breaks other controllers, so that may not be the solution. I am attaching logs from WINEDEBUG=+dinput wine control for the unpatched and patched cases. I am also attaching the udevadm info for the joystick.