From: Shaun Ren <sren@codeweavers.com> This allows dwPacketNumber to be incremented properly, and also allows others fields to retain their previous values in case of read failure. --- dlls/xinput1_3/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/xinput1_3/main.c b/dlls/xinput1_3/main.c index a7657b125af..d25c234b5cf 100644 --- a/dlls/xinput1_3/main.c +++ b/dlls/xinput1_3/main.c @@ -601,6 +601,8 @@ static void read_controller_state(struct xinput_controller *controller) status = HidP_GetUsages(HidP_Input, HID_USAGE_PAGE_BUTTON, 0, buttons, &button_length, controller->hid.preparsed, report_buf, report_len); if (status != HIDP_STATUS_SUCCESS) WARN("HidP_GetUsages HID_USAGE_PAGE_BUTTON returned %#lx\n", status); + get_current_state(controller - controllers, &state); + state.Gamepad.wButtons = 0; for (i = 0; i < button_length; i++) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11192