https://bugs.winehq.org/show_bug.cgi?id=52408
Bug ID: 52408 Summary: Number of gamepads limited and multiple gamepads broken Product: Wine Version: 7.0-rc6 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: xinput Assignee: wine-bugs@winehq.org Reporter: tomashnyk@gmail.com Distribution: ---
I first discussed this here: https://forum.winehq.org/viewtopic.php?f=8&t=36088 but eventually came to a conclusion this is a bug. It has two sides:
1) Wine will only register 4 gamepads even if more are connected.
2) When multiple gamepads are connected, Wine loses atleast some of their input.
Ad 1). I used Gamepad Tool from https://generalarcade.com/gamepadtool/ to check how many gamepads are connected. I used (unknowingly) kbct: https://github.com/samvel1024/kbct to create 4 virtual gamepads in addition to my real one. I am sure there are other ways to add more gamepads, either just connecting them physically or somehow fakeing them. With KBCT, one just needs to add an appropriate number of devices to grab. Kbct will produce a fake gamepad for each grabbed device, as it will list each device as being able to emit basically all keys linux knows, including gamepad keys. So a minimal config.yaml would be on my system like this:
- keyboards: ["Logitech K800", "AT Translated Set 2 keyboard", "Logitech MX Vertical", "ThinkPad Extra Buttons"]
- one just needs to list some devices available when running evtest.
This bug is not about kbct - that is just a way to trigger this bug, which I believe is presetn in Wine. Linux otherwise does not have any problem detecting moredevices.
2) When I reduced the number of faked devices to two (and one real one), my game (Worms WMD) would register just the left axis of the gamepad and not other controls. Curiously, when I tried GamePad tool, it would register the presses. No idea how Windows would behave, but I do not see a reason why the game would not be able to use multiple gamepads.
https://bugs.winehq.org/show_bug.cgi?id=52408
temp82@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com, | |temp82@luukku.com
https://bugs.winehq.org/show_bug.cgi?id=52408
--- Comment #1 from Rémi Bernon rbernon@codeweavers.com --- Gamepads are usually exposed to Windows applications as XInput-compatible devices, and the Windows XInput API only supports up to 4 gamepads. This is not a Wine specific limitation but a limitation of the API itself.
Wine control panel now has an override button to force the joystick devices not to be recognized as XInput-compatible, and although some games actually only support XInput for input, it will remove the device number limitation in others.
I'm working on implementing Windows.Gaming.Input API which supports XInput-compatible gamepads, and doesn't suffer from the limitation, but there again only games which implement support for this API (ie: using some recent version of SDL) will benefit from it.
https://bugs.winehq.org/show_bug.cgi?id=52408
--- Comment #2 from Rémi Bernon rbernon@codeweavers.com --- Regarding the missing input, it could be a genuine bug though I haven't seen any other report about it so far.