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

Signed-off-by: Ivo Ivanov <logos128@gmail.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ivo Ivanov 2021-11-12 09:49:44 +01:00 committed by Alexandre Julliard
parent ab4bed6775
commit 576bf9239f
1 changed files with 5 additions and 0 deletions

View File

@ -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;