Joystick Issue.

Questions about Wine on Linux
Locked
Isakku
Newbie
Newbie
Posts: 3
Joined: Mon Feb 05, 2018 6:30 pm

Joystick Issue.

Post by Isakku »

Hello there! I have a little but really bothering problem.
I have an HP Laptop running Linux Mint KDE 18.3 and I must thank Wine devs because I can run windows programs and games on Linux.
However the laptop's hardware comes with a buit-in accelerometer used by the hdapsd daemon to protect the HDD.
Now the trouble starts here: Said accelerometer is recognized by linux as another joystick (js0) and I have tried many things to fix it to no avail.

This fix
https://ubuntuforums.org/showthread.php?t=1595666
is no longer available since it seems that the name parameter of devices can no longer be changed.
(and even if it were possible I wonder if I would run into trouble with the accelerometer if I were to remap it to let's say js9 instead of js0)

I have experienced the following problems so far:
I had tried disabling the accelerometer in the joysticks config (I have noticed that all it does is just add a registry key after all)
but even so some programs still don't work as expected because whenever I plug in a real joystick it is js1 on Linux and for Wine games it is always the 2nd joystick!

So, even disabling the accelerometer I always end up with the 1st player without a joystick and whatever joystick I connect is player 2's joystick!.
Is there any way to give a "priority" or something like that? I want to remap js1 to be the first joystick (player1) instead of the 2nd (Player2) at least for Wine.
I really hope you could help me or even better: add such a feature to Wine if possible.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Joystick Issue.

Post by Bob Wya »

@Isakku

Does running:

Code: Select all

wine control.exe joy.cpl
help at all?

Bob
Isakku
Newbie
Newbie
Posts: 3
Joined: Mon Feb 05, 2018 6:30 pm

Re: Joystick Issue.

Post by Isakku »

Bob Wya wrote:@Isakku

Does running:

Code: Select all

wine control.exe joy.cpl
help at all?

Bob
Thanks a lot for your interest. Sadly no, it doesn't help at all, perhaps I should report a bug that is not specific to any aplication but it affects WINE as a whole:
Using the interface that joy.cpl shows, all it does is add a registry key which is supposed to disable the desired joystick on WINE, but it is not working at all, I had tested disabling all the available joysticks and my game was still normally receiving the input from them!

(it is all here, https://github.com/miurahr/wine/commit/ ... d44bfdd2b1 as the source code shows it just Writes to the DirectInput registry key that enables/disables a joystick from being enumerated, but perhaps that's not happening, or perhaps that's not enough, it simply doesn't work at all because even if I disable all joysticks, it is as if nothing had been done, they are still recognized by the game!)

There is definitely a bug in the WINE joystick system.
I have tested disabling all the joysticks and my game was still recognizing all of them (including the accelerometer which I wanted to disable in the first place) as if nothing had happened.
Locked