Rémi Bernon : dinput: Ignore override flag for non-XInput devices.
Alexandre Julliard
julliard at winehq.org
Wed Feb 16 15:30:26 CST 2022
Module: wine
Branch: master
Commit: a3b0cb74cdc994a1d4aae2aabe71542dd604ee63
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a3b0cb74cdc994a1d4aae2aabe71542dd604ee63
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Wed Feb 16 09:26:58 2022 +0100
dinput: Ignore override flag for non-XInput devices.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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;
More information about the wine-cvs
mailing list