Ivo Ivanov : dinput: Set effect block index in the second type specific report.

Alexandre Julliard julliard at winehq.org
Fri Nov 12 16:16:04 CST 2021


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

Author: Ivo Ivanov <logos128 at gmail.com>
Date:   Fri Nov 12 09:49:44 2021 +0100

dinput: Set effect block index in the second type specific report.

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

---

 dlls/dinput/joystick_hid.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index c49e840f845..500ae05d481 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -2581,6 +2581,11 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface )
                                           impl->index, impl->joystick->preparsed, impl->type_specific_buf[0], report_len );
         if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue returned %#x\n", status );
 
+        if (!impl->type_specific_buf[1][0]) status = HIDP_STATUS_SUCCESS;
+        else status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX,
+                                          impl->index, impl->joystick->preparsed, impl->type_specific_buf[1], report_len );
+        if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue returned %#x\n", status );
+
         status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX,
                                      impl->index, impl->joystick->preparsed, impl->effect_update_buf, report_len );
         if (status != HIDP_STATUS_SUCCESS) hr = status;




More information about the wine-cvs mailing list