dinput: Only call internal poll callback when device is acquired.

Fixes a regression from 53fcfe3834.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52022
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51956
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 2021-11-12 14:42:33 +01:00 committed by Alexandre Julliard
parent 2a77543c53
commit 90ebe524da
1 changed files with 1 additions and 0 deletions

View File

@ -1537,6 +1537,7 @@ static HRESULT WINAPI dinput_device_Poll( IDirectInputDevice8W *iface )
EnterCriticalSection( &impl->crit ); EnterCriticalSection( &impl->crit );
if (!impl->acquired) hr = DIERR_NOTACQUIRED; if (!impl->acquired) hr = DIERR_NOTACQUIRED;
LeaveCriticalSection( &impl->crit ); LeaveCriticalSection( &impl->crit );
if (FAILED(hr)) return hr;
if (impl->vtbl->poll) return impl->vtbl->poll( iface ); if (impl->vtbl->poll) return impl->vtbl->poll( iface );
return hr; return hr;