https://bugs.winehq.org/show_bug.cgi?id=47326
Bug ID: 47326 Summary: Fair Strike fails to map joystick due to IDirectInputDevice8 SetActionMap being a semi-stub. Product: Wine Version: 4.9 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: directx-dinput Assignee: wine-bugs@winehq.org Reporter: leslie_alistair@hotmail.com Distribution: ---
The default joystick actions fail to be mapped since IDirectInputDevice8 SetActionMap assumes that the instance guid is not NULL.
https://bugs.winehq.org/show_bug.cgi?id=47326
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/dinput-SetAction | |Map-genre Status|NEW |STAGED
https://bugs.winehq.org/show_bug.cgi?id=47326
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #1 from Rémi Bernon rbernon@codeweavers.com --- I think this might be fixed, although it's unclear what is wrong. If it's not, a more detailed description and a +dinput log would be welcome.
https://bugs.winehq.org/show_bug.cgi?id=47326
--- Comment #2 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Created attachment 74230 --> https://bugs.winehq.org/attachment.cgi?id=74230 Windows image
https://bugs.winehq.org/show_bug.cgi?id=47326
--- Comment #3 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Created attachment 74231 --> https://bugs.winehq.org/attachment.cgi?id=74231 wine image
https://bugs.winehq.org/show_bug.cgi?id=47326
--- Comment #4 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Created attachment 74232 --> https://bugs.winehq.org/attachment.cgi?id=74232 dinput log
https://bugs.winehq.org/show_bug.cgi?id=47326
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-sta |https://gitlab.winehq.org/w |ging/wine-staging/tree/mast |ine/wine-staging/-/tree/mas |er/patches/dinput-SetAction |ter/patches/dinput-joy-mapp |Map-genre |ings
--- Comment #5 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- From the supplied screenshots you can see that an invalid mapping occurs under wine. Both the Cyclic Left-Right and Rudder Control are mapped to the same Axis.
To start with in function dinput_device_SetActionMap
if (!IsEqualGUID( &impl->guid, &format->rgoAction[i].guidInstance )) continue; This makes the assumption that an application will ask for a guidInstance, this is incorrect and in fact Fair Strike supplies this as GUID_NULL.
Updated what patchset that would fix it. (Currently disabled).
The following patch is what made it work before your changes. 0004-dinput-Allow-mapping-of-controls-based-of-Genre-type.patch
https://bugs.winehq.org/show_bug.cgi?id=47326
--- Comment #6 from Rémi Bernon rbernon@codeweavers.com ---
if (!IsEqualGUID( &impl->guid, &format->rgoAction[i].guidInstance )) continue; This makes the assumption that an application will ask for a guidInstance, this is incorrect and in fact Fair Strike supplies this as GUID_NULL.
As far as I understand, this is supposed to be filled by BuildActionMap. If it's GUID_NULL then it simply failed to match any device object and it is unmapped.
Then mayb the game doesn't call BuildActionMap and expects SetActionMap to re-do the matching, or to match nonetheless. I'll write a few tests to check that.
https://bugs.winehq.org/show_bug.cgi?id=47326
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|STAGED |RESOLVED Fixed by SHA1| |782ad8f70c60b35c19a4469f322 | |818f3d879933e
--- Comment #7 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://gitlab.winehq.org/wine/wine/-/commit/782ad8f70c60b35c19a4469f322818f...
https://bugs.winehq.org/show_bug.cgi?id=47326
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.5.