Rémi Bernon (@rbernon) commented about dlls/winmm/joystick.c:
struct joystick *joystick = &joysticks[index]; + DIOBJECTDATAFORMAT *object_format; + DIDATAFORMAT data_format = {0}; IDirectInputDevice8W *device; + unsigned int i, j; HANDLE event; HRESULT hr;
+ static const struct + { + WORD usages[5]; + } + usage_mappings[6] = + { + [AXIS_X] = {{HID_USAGE_GENERIC_X, HID_USAGE_GENERIC_RY}}, + [AXIS_Y] = {{HID_USAGE_GENERIC_Y, HID_USAGE_GENERIC_RX}},
The secondary axes usage seem inverted? Fwiw a simple test, failing with the current mapping, and fixed with this would be appreciated. For instance something that reproduces the usages of the device you want to fix. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4029#note_47824