[Bug 34297] New: Allow reconnecting to disconnected joysticks
http://bugs.winehq.org/show_bug.cgi?id=34297 Bug #: 34297 Summary: Allow reconnecting to disconnected joysticks Product: Wine Version: 1.7.0 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: directx-dinput AssignedTo: wine-bugs(a)winehq.org ReportedBy: achurch+wine(a)achurch.org Classification: Unclassified Created attachment 45660 --> http://bugs.winehq.org/attachment.cgi?id=45660 Proof-of-concept patch Currently, if a joystick is disconnected and then reconnected (because the cable is pulled out, for example), Wine acts as though the joystick is present but stuck at the last state it reported, and it fails to report any subsequent changes in device state, which is an arguably suboptimal user experience. The attached patch (against 1.7.0) changes the Linux evdev driver to attempt to reopen a joystick device after a read fails. This patch uses the simple heuristic of "if it's on the same device file and has the same name, it's the same joystick", which means (1) it won't reconnect if the device file changes and (2) it could falsely reconnect if there are multiple input devices with the same name, but it works for simple circumstances. Naturally, one could iterate over all possible input devices to try and find the device, but that could be fairly expensive to do on every poll operation, and it would probably involve concurrency issues relating to checking whether the device is already known as a different joystick. In the long run, it might be better to monitor the /dev/input directory for added and removed devices (perhaps using inotify) and use those events to handle reconnection. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34297 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |hardware, patch -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34297 --- Comment #1 from Vincent Povirk <madewokherd(a)gmail.com> 2013-08-19 17:29:13 CDT --- Wouldn't it make more sense to report the disconnection to the app in this case? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34297 --- Comment #2 from Andrew Church <achurch+wine(a)achurch.org> 2013-08-19 18:02:05 CDT --- I looked over the DirectInput interface and didn't see any method for reporting that, which is why I took the reconnect route. That said, I'm not at all familiar with DInput so if there's a better way to handle dead devices, that's fine too. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34297 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx(a)gmail.com, | |winetest(a)luukku.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34297 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |STAGED CC| |leslie_alistair(a)hotmail.com Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/dinput-reconnect | |-joystick Ever confirmed|0 |1 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34297 Rémi Bernon <rbernon(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon(a)codeweavers.com --- Comment #3 from Rémi Bernon <rbernon(a)codeweavers.com> --- I tested that scenario recently and I believe it greatly improved. Could you check if you still see the buggy behavior with current Wine HEAD? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34297 --- Comment #4 from Andrew Church <achurch+wine(a)achurch.org> --- DirectInput joystick handling in f712a98d seems to handle disconnect/reconnect fine, with the reconnect being transparent to applications (tested with Astebreed v1.21: http://edelweiss.skr.jp/works/astebreed/index.html). Thanks for your work on the code! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34297 --- Comment #5 from Rémi Bernon <rbernon(a)codeweavers.com> --- Thanks for the confirmation! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34297 Rémi Bernon <rbernon(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |022076532fcc81fd6f7ebbb7741 | |9670ce93b995a Status|STAGED |RESOLVED Resolution|--- |FIXED -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34297 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 6.20. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla