Hello all,
disabling an specific joystick device is an issue that is raised from time to time in this list. I'm planning on implementing it as a registry key like 'DirectInput/Disable controllername'.
However I'd like the ability to disable specific joysticks on Linux, like the /dev/input/js* version, while keeping the /dev/input/event* one being enumerated. One option for doing this would be having a "Disable USB Controller" -> "driver" key with options being: "linux", "linuxinput", and "all". My only doubt is how would you guys want to have this option in joy.cpl? I think the correct thing to do would be to disable it with "all", but my use case includes a user disabling the repeated joysticks on Linux through the interface and if he's only able to disable all drivers at once that would be confusing and less useful.
The bottom line is: can I add platform dependent code in joy.cpl for this purpose? If that's not an option, do you have some other way to do through joy.cpl or should it be registry only?
Attached is an example patch of the approach for joystick_linuxinput.c
Cheers, Lucas
On 06/18/2012 12:07 PM, Lucas Zawacki wrote:
The bottom line is: can I add platform dependent code in joy.cpl for this purpose? If that's not an option, do you have some other way to do through joy.cpl or should it be registry only?
If you use generated device GUIDs that won't be as "platform dependent" but at the same time will uniquely identify which joystick you want to disable. If you worry about devices moving around and getting different IDs - then use part of GUID to identify driver and add device name to identify the joystick.
The most common use case is to have only one joystick via best working driver. Instead of 2 joysticks representing the same exact device. This means "all" would almost never be used.
Another feature could be defining the order of enumeration without disabling any joysticks. In a sense creating a default device. This is an extra bonus and can be accomplished by disabling unwanted devices. So it's more of "nice to have" category.
Vitaliy.
On Mon, Jun 18, 2012 at 11:04 PM, Vitaliy Margolen wine-devel@kievinfo.com wrote:
If you worry about devices moving around and getting different IDs - then use part of GUID to identify driver and add device name to identify the joystick.
Yes, that seems like the way to go. I'll use the GUIDs to show the device names and disable the correct drivers using joy.cpl. I agree that disabling both the joysticks is not useful so I'll just stick with "Disable controllername"="drivername" with "linux" and "linuxinput" as options.