mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[WINESYNC] setupapi: Use lowercase device paths.
Some games are doing case sensitive matches on the device paths obtained from Setup API and expect them to be lowercase. This fixes Virginia not being able to discover DualShock 4. Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 30a026d2454b2de93257e9eb895573ce8c56dc05 by Arkadiusz Hiler <ahiler@codeweavers.com>
This commit is contained in:
parent
e971dfba66
commit
a3ae613de4
2 changed files with 14 additions and 1 deletions
|
@ -1029,6 +1029,18 @@ static void test_register_device_info(void)
|
|||
SetupDiDestroyDeviceInfoList(set);
|
||||
}
|
||||
|
||||
static void check_all_lower_case(int line, const char* str)
|
||||
{
|
||||
const char *cur;
|
||||
|
||||
for (cur = str; *cur; cur++)
|
||||
{
|
||||
BOOL is_lower = (tolower(*cur) == *cur);
|
||||
ok_(__FILE__, line)(is_lower, "Expected device path to be all lowercase but got %s.\n", str);
|
||||
if (!is_lower) break;
|
||||
}
|
||||
}
|
||||
|
||||
static void check_device_iface_(int line, HDEVINFO set, SP_DEVINFO_DATA *device,
|
||||
const GUID *class, int index, DWORD flags, const char *path)
|
||||
{
|
||||
|
@ -1050,6 +1062,7 @@ static void check_device_iface_(int line, HDEVINFO set, SP_DEVINFO_DATA *device,
|
|||
ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, detail, sizeof(buffer), NULL, NULL);
|
||||
ok_(__FILE__, line)(ret, "Failed to get interface detail, error %#x.\n", GetLastError());
|
||||
ok_(__FILE__, line)(!strcasecmp(detail->DevicePath, path), "Got unexpected path %s.\n", detail->DevicePath);
|
||||
check_all_lower_case(line, detail->DevicePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -10,4 +10,4 @@ files:
|
|||
dlls/setupapi/setupcab.c: dll/win32/setupapi/setupcab.c
|
||||
dlls/setupapi/stringtable.c: dll/win32/setupapi/stringtable_wine.c
|
||||
tags:
|
||||
wine: 5030f4cf26c31bc709d6565182b51af1165953a6
|
||||
wine: 30a026d2454b2de93257e9eb895573ce8c56dc05
|
||||
|
|
Loading…
Reference in a new issue