Rémi Bernon : dinput: Only read effect state reports when exclusively acquired.

Alexandre Julliard julliard at winehq.org
Fri Feb 18 15:15:00 CST 2022


Module: wine
Branch: master
Commit: 6d7889ef5314ef73187a408a98db0d9113914ac4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=6d7889ef5314ef73187a408a98db0d9113914ac4

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Fri Feb 18 10:31:14 2022 +0100

dinput: Only read effect state reports when exclusively acquired.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dinput/joystick_hid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index 4987a9f9872..13c168bca89 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -1273,7 +1273,7 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface )
             if (impl->base.hEvent && memcmp( &params.old_state, impl->base.device_state, format->dwDataSize ))
                 SetEvent( impl->base.hEvent );
         }
-        else if (report_buf[0] == impl->pid_effect_state.id)
+        else if (report_buf[0] == impl->pid_effect_state.id && is_exclusively_acquired( impl ))
         {
             status = HidP_GetUsageValue( HidP_Input, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX,
                                          &index, impl->preparsed, report_buf, report_len );




More information about the wine-cvs mailing list