From: Connor McAdams <cmcadams@codeweavers.com> Fixes a bug in "Like A Dragon: Infinite Wealth", which uses the path returned by DIPROP_GUIDANDPATH to detect XInput devices. Signed-off-by: Connor McAdams <cmcadams@codeweavers.com> --- dlls/dinput/joystick_hid.c | 1 + dlls/dinput/tests/joystick8.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 9277eea5e96..cf7f01d4b45 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -144,6 +144,7 @@ static HRESULT insert_cache_entry( DIDEVICEINSTANCEW *instance, DWORD joy_id, co debugstr_w( path ), next->joy_id ); next->instance = *instance; wcscpy( next->path, path ); + CharLowerW( next->path ); return S_OK; } } diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c index ddcbddc9880..6aac9ea14e5 100644 --- a/dlls/dinput/tests/joystick8.c +++ b/dlls/dinput/tests/joystick8.c @@ -6037,6 +6037,8 @@ static void check_device_hid_serial_( int line, IDirectInputDevice8W *device, co hr = IDirectInputDevice8_GetProperty( device, DIPROP_GUIDANDPATH, &prop_guid_path.diph ); ok_(__FILE__, line)( hr == S_OK, "Unexpected hr %#lx.\n", hr ); + ok_(__FILE__, line)( !!wcsstr(prop_guid_path.wszPath, L"hid"), "Unexpected path %s.\n", + debugstr_w(prop_guid_path.wszPath) ); file_handle = CreateFileW( prop_guid_path.wszPath, FILE_READ_ACCESS | FILE_WRITE_ACCESS, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11156