Rémi Bernon (@rbernon) commented about dlls/windows.gaming.input/gamepad.c:
if (FAILED(hr = IWineGameControllerProvider_get_State( impl->wine_provider, &state ))) return hr;
- value->Buttons = 0; + impl->state_changed = impl->state_changed + || !!memcmp( impl->initial_state.axes, state.axes, sizeof(state) - sizeof(state.timestamp) ); + + memset(value, 0, sizeof(*value)); + if (impl->state_changed) + { if (state.buttons[0]) value->Buttons |= GamepadButtons_A;
```suggestion:-6+0 memset(value, 0, sizeof(*value)); if (impl->state_changed || memcmp( impl->initial_state.axes, state.axes, sizeof(state) - offsetof(struct WineGameControllerState, axes) )) { impl->state_changed = TRUE; if (state.buttons[0]) value->Buttons |= GamepadButtons_A; ``` (Use `offsetof(struct WineGameControllerState, axes)`, style is a bit more of a nit.) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6380#note_80231