dinput: Only read effect state reports when exclusively acquired.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2022-02-18 10:31:14 +01:00 committed by Alexandre Julliard
parent f6ef943b9c
commit 6d7889ef53
1 changed files with 1 additions and 1 deletions

View File

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