https://bugs.winehq.org/show_bug.cgi?id=50321
Bug ID: 50321 Summary: Wine Linux-input joystick driver unable to detect joystick with id > 64 Product: Wine Version: 6.0-rc2 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dinput Assignee: wine-bugs@winehq.org Reporter: messengerofdeath@gmail.com Distribution: ---
Created attachment 68903 --> https://bugs.winehq.org/attachment.cgi?id=68903 Patch for scanning of /dev/input/event*
My joystick is not visible in wine (wine control joy.cpl) as evdev device. Visible only as js device but js device works bad with my device. I found that wine only can support joystick via evdev that have id less then 64.
According to joystick_linuxinput.c currently maximum scanned /dev/input/eventX file is the /dev/input/event64 but on my system i have joystick on event 265(throttle) and 266(stick)
Possible solution is to extend MAX_JOYDEV to some big value (512 for example). Or another way - scan /dev/input folder. I've attached working patch for joystick_linuxinput.c that uses readdir functionality.
Reproducible on 5.22, 6.0-rc1, 6.0-rc2
https://bugs.winehq.org/show_bug.cgi?id=50321
Denis messengerofdeath@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #68903|0 |1 is obsolete| |
--- Comment #1 from Denis messengerofdeath@gmail.com --- Created attachment 68904 --> https://bugs.winehq.org/attachment.cgi?id=68904 Patch for scanning of /dev/input/event*
Added exit condition when directory fully read
https://bugs.winehq.org/show_bug.cgi?id=50321
Torge Matthies openglfreak@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |openglfreak@googlemail.com
--- Comment #2 from Torge Matthies openglfreak@googlemail.com --- Created attachment 69163 --> https://bugs.winehq.org/attachment.cgi?id=69163 Less broken version of the previous patch
I fixed some things in the patch, please test this one @Denis
https://bugs.winehq.org/show_bug.cgi?id=50321
--- Comment #3 from Denis messengerofdeath@gmail.com --- No, it doesn't work. I made small checks and corrected this version. Also I've added closedir at the end.
https://bugs.winehq.org/show_bug.cgi?id=50321
Denis messengerofdeath@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #68904|0 |1 is obsolete| |
--- Comment #4 from Denis messengerofdeath@gmail.com --- Created attachment 69164 --> https://bugs.winehq.org/attachment.cgi?id=69164 Patch for scanning of /dev/input/event*
https://bugs.winehq.org/show_bug.cgi?id=50321
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=50321
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #5 from Rémi Bernon rbernon@codeweavers.com --- The legacy joystick backends have been removed, and I believe winebus.sys doesn't have this limitation (it either uses SDL or udev for device enumeration). Please re-check if this is still happening with latest Wine HEAD.