[Request]: "Universal XInput mode" controller compatibility checkbox
Tell us the problem or your need
A significant number of people have Playstation and Switch controllers, which by default act exactly like Windows: Not detected in games unless the game itself has native support for it.
This Wine feature is the number 1 reason for people's gamepads not working in Bottles.
Wine has a registry key which forces all those advanced controllers to become regular XInput devices instead. They lose their extra features (touchpads, gyros, microphones and even haptics (since Sony uses an audio channel in the exposed "USB device" for that)). But they then work in all games.
Describe the solution you'd like
This would fix #3857.
I wrote a more detailed description in https://github.com/bottlesdevs/dependencies/pull/348#issuecomment-5653480240. Be sure to read that.
Here's the suggested implementation:
- "Settings: Compatibility: Controller Compatibility" opens up a new popup with one setting:
- "Universal XInput mode"
- Subtext/Description: "Converts advanced controllers to standard XInput. Improves compatibility in games that don't recognize PlayStation or Switch controllers, but disables advanced features like gyro, touchpads, microphones and haptics."
- What registry setting it toggles:
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus]
"DisableHidraw"=dword:1Other solutions?
In Wine 9 and newer, this setting can also be toggled via the Wine control panel, which is very inconvenient to launch and navigate to, and not universally available for all versions of Wine.
Additional context and references
The reason why I think "Controller Compatibility" should be a dedicated popup is because there's other things that could be added there later.
For example:
- A "Repair Wine XInput" button: Loops through
["xinput1_1", "xinput1_2", "xinput1_3", "xinput9_1_0"]and sets all of those DLLs tobuiltinso that Wine's XInput is used instead of the utterly broken legacy Microsoft XInput DLLs. - A checkbox and file chooser for the SDL_GAMECONTROLLERCONFIG_FILE environment variable, which is useful for importing SDL_GameControllerDB, a community project for completely mapping the button layout of over 2000 old and obscure controllers. It's also useful for making custom button mapping files. Without this, some weird and cheap controllers can have wrong button layouts.
Source: bottlesdevs/Bottles