Rémi Bernon : windows.gaming.input: Ignore IDirectInputDevice8_GetDeviceState failures.
Alexandre Julliard
julliard at winehq.org
Thu May 19 16:15:12 CDT 2022
Module: wine
Branch: master
Commit: 3c304287e7b83c3878dc97ddd3555ac7c48fcc94
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3c304287e7b83c3878dc97ddd3555ac7c48fcc94
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Fri May 6 10:50:13 2022 +0200
windows.gaming.input: Ignore IDirectInputDevice8_GetDeviceState failures.
We will get hotplug notifications asynchronously, and returning an error
here can cause uncaught C++ exceptions in games.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/windows.gaming.input/provider.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/windows.gaming.input/provider.c b/dlls/windows.gaming.input/provider.c
index 1f3f4e047f5..39229a35c7d 100644
--- a/dlls/windows.gaming.input/provider.c
+++ b/dlls/windows.gaming.input/provider.c
@@ -212,7 +212,7 @@ static HRESULT WINAPI wine_provider_get_State( IWineGameControllerProvider *ifac
if (FAILED(hr = IDirectInputDevice8_GetDeviceState( impl->dinput_device, sizeof(state), &state )))
{
WARN( "Failed to read device state, hr %#lx\n", hr );
- return hr;
+ return S_OK;
}
i = ARRAY_SIZE(state.rgbButtons);
More information about the wine-cvs
mailing list