Commit a3b0cb74 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput: Ignore override flag for non-XInput devices.

parent cd6bab2b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment