[PATCH 4/5] dinput: Ignore override flag for non-XInput devices.
Rémi Bernon
rbernon at codeweavers.com
Wed Feb 16 02:26:58 CST 2022
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/dinput/joystick_hid.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index 47670ebd732..e35ca699126 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -1577,11 +1577,9 @@ static HRESULT hid_joystick_device_open( int index, DIDEVICEINSTANCEW *filter, W
if (device_instance_is_disabled( &instance, &override ))
goto next;
- if (override)
+ if (override && SetupDiGetDeviceInstanceIdW( set, &devinfo, device_id, MAX_PATH, NULL ) &&
+ (tmp = wcsstr( device_id, L"&IG_" )))
{
- if (!SetupDiGetDeviceInstanceIdW( set, &devinfo, device_id, MAX_PATH, NULL ) ||
- !(tmp = wcsstr( device_id, L"&IG_" )))
- goto next;
memcpy( tmp, L"&XI_", sizeof(L"&XI_") - sizeof(WCHAR) );
if (!SetupDiOpenDeviceInfoW( xi_set, device_id, NULL, 0, &devinfo ))
goto next;
--
2.34.1
More information about the wine-devel
mailing list