http://bugs.winehq.org/show_bug.cgi?id=26810
Summary: DirectInput gives incorrect gamepad device Product: Wine Version: 1.3.17 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dinput AssignedTo: wine-bugs@winehq.org ReportedBy: tehpola@yahoo.com
I'm using a Playstation 3 DualShock 3 controller over USB with my Ubuntu 10.10 system. It generally works fine with native applications; however, I've been unable to get it working with Wine applications.
When investigating further, I found a simple application which could test out DirectInput joystick devices: http://www.csh.rit.edu/~jon/projects/joystick/. Building this using winemaker (small tweaks were required) demonstrated that two devices were created for the single gamepad. The first device was incorrect: the X axis of the left stick was stuck at 128 (a minimal value as the values for the axises were unsigned 16-bit values). The second device seemed correct and even the right stick registered properly (when the device had an "X,Y,Rx,Ry" entry in the registry).
Hopefully someone with some DirectInput experience will know what's going on here. I have yet to look at the code, but may do so when time allows. Let me know if any further information is needed.
http://bugs.winehq.org/show_bug.cgi?id=26810
--- Comment #1 from Mike Slegeir tehpola@yahoo.com 2011-04-17 13:21:04 CDT --- Created an attachment (id=34162) --> (http://bugs.winehq.org/attachment.cgi?id=34162) My test application
To build and run the application:
From the joystick-1.0 directory: make joystick.o From the Test directory: make
To execute: wine test.exe.so The application will display the axis values of all the devices.
http://bugs.winehq.org/show_bug.cgi?id=26810
Mike Slegeir tehpola@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tehpola@yahoo.com
http://bugs.winehq.org/show_bug.cgi?id=26810
--- Comment #2 from Mike Slegeir tehpola@yahoo.com 2011-04-17 23:53:08 CDT --- Created an attachment (id=34164) --> (http://bugs.winehq.org/attachment.cgi?id=34164) WINEDEBUG=-all,+joystick,+dinput log starting a game
It appears from this log that the two devices are created from /dev/input/eventX and /dev/input/jsX since the joystick could be interacted with from either. Is there a unique identifier you could check for to avoid these duplicates and choose the more reliable input method?
http://bugs.winehq.org/show_bug.cgi?id=26810
Vitaliy Margolen vitaliy-bugzilla@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|DirectInput gives incorrect |Two joysticks reported |gamepad device |instead of one Severity|normal |enhancement
--- Comment #3 from Vitaliy Margolen vitaliy-bugzilla@kievinfo.com 2011-04-18 20:42:53 CDT --- Not a bug. This is intended behavior. The only thing possibly can be done is a way to disable one or the other driver.
http://bugs.winehq.org/show_bug.cgi?id=26810
--- Comment #4 from Mike Slegeir tehpola@yahoo.com 2011-04-18 22:36:48 CDT --- That would be nice to have as some games (Deathspank and I'm sure many more) don't allow you to choose which joystick you'll be using, but just simply assume player one gets the first device, player two gets the second.
http://bugs.winehq.org/show_bug.cgi?id=26810
Lucas Fialho Zawacki lfzawacki@yahoo.com.br changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lfzawacki@yahoo.com.br
--- Comment #5 from Lucas Fialho Zawacki lfzawacki@yahoo.com.br 2012-08-24 15:26:24 CDT --- Hello, the commits to make disabling specific joysticks possible using the 'Game Controllers' control panel applet are in the wine tree now. You can try it building latest git or waiting for Wine 1.5.12. Then I think this can be closed 'FIXED' or 'INVALID' I dunno.
http://bugs.winehq.org/show_bug.cgi?id=26810
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com, | |austinenglish@gmail.com
--- Comment #6 from Bruno Jesus 00cpxxx@gmail.com 2012-10-11 13:50:09 CDT --- Austin, it's now possible to disable joysticks action which fixes this bug. We could resolve this as fixed but then there would be 2 bugs solved by the same commit id (78c8fe0db2041f6eec3a586361354cd44bfdd2b1). Should we close this as duplicate of 30690, invalid or fixed?
http://bugs.winehq.org/show_bug.cgi?id=26810
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |78c8fe0db2041f6eec3a5863613 | |54cd44bfdd2b1 Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #7 from Austin English austinenglish@gmail.com 2012-10-11 13:51:34 CDT --- (In reply to comment #6)
Austin, it's now possible to disable joysticks action which fixes this bug. We could resolve this as fixed but then there would be 2 bugs solved by the same commit id (78c8fe0db2041f6eec3a586361354cd44bfdd2b1). Should we close this as duplicate of 30690, invalid or fixed?
It's a separate issue, let's mark it as fixed.
http://bugs.winehq.org/show_bug.cgi?id=26810
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2012-10-12 13:35:45 CDT --- Closing bugs fixed in 1.5.15.