Hi all, I am a heavy user of wine and proton for games and for some time the failures some games had with my HOTAS (Hands On Throttle-And-Stick) have been bothering me. I tried to take a look at wine code and found out that the maximum numbers of buttons for a single device was hardwired to 32 and the maximum number of analog axes was hardwired to 4 pairs (8 axes). My own HOTAS, a very common Logitech X52 Pro, has a bigger number of buttons -- 39, so the higher buttons would "carry over" to register like they were lower buttons -- and this prevented it from working on games. I increased these hardwired numbers to 64 and 8 respectively, and the patch seems to have largely worked on all games I used it -- for example, I am only able to play Elite: Dangerous with my patched proton version.
However, there have been some problems, like a few sliders not working -- slider 7 (you could check the numbering of axes with a program like antimicro on Linux) does not seem to register in Star Citizen, for example. I noticed from joystick.c that the analog axes seem to have specific names and functionality, like DIJOFS_RX and DIJOFS_SLIDER, and if I understood what's going on, it might prevent the code to work generally with obscure devices that have a couple number of sliders, is that correct? How could I get the code to recognize and translate my axes to games?
Also, for this patch to be complete I will also need to change the GUI for testing joystick via "wine control", and I do not have much experience with Windows programming. Any help would be welcome.
This patch has around 50 to 60 hours of testing.
--
Cláudio "Patola" Sampaio
MakerLinux Labs - Campinas, SP