dinput: Reset button state for each report read.
commit3ad4f9f356b9f59731bf7e5c8abbdcee145994ba
authorRémi Bernon <rbernon@codeweavers.com>
Thu, 13 Jan 2022 13:14:55 +0000 (13 14:14 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 13 Jan 2022 16:04:50 +0000 (13 17:04 +0100)
treed7ce35725327c1026a79a8611c604c31930c6dc9
parentcb41e4b1753891f5aa22cb617e8dd124c3dd8983
dinput: Reset button state for each report read.

As we loop on ReadFile success we may read multiple reports at once, but
we never reset buttons in the enumeration params. The pressed buttons
are returned by HidP_GetUsagesEx and any other button must be cleared.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52387
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/dinput/joystick_hid.c