From: "Rémi Bernon" Subject: [PATCH] dinput: Only call internal poll callback when device is acquired. Message-Id: <20211112134233.647958-1-rbernon@codeweavers.com> Date: Fri, 12 Nov 2021 14:42:33 +0100 Fixes a regression from 53fcfe3834da3c43838cd26bdeb4fdb335542627. 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 --- dlls/dinput/device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 85392c6b30b..a0fc47ec05b 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -1537,6 +1537,7 @@ static HRESULT WINAPI dinput_device_Poll( IDirectInputDevice8W *iface ) EnterCriticalSection( &impl->crit ); if (!impl->acquired) hr = DIERR_NOTACQUIRED; LeaveCriticalSection( &impl->crit ); + if (FAILED(hr)) return hr; if (impl->vtbl->poll) return impl->vtbl->poll( iface ); return hr; -- 2.33.1