From: Arkadiusz Hiler Subject: [PATCH 1/3] RawInput: Uppercase the device names up to the GUID. Message-Id: <20210222115038.359258-1-ahiler@codeweavers.com> Date: Mon, 22 Feb 2021 13:50:36 +0200 This is a preparation for a patch that changes setupapi to return lowercased device paths, which is the source of RawInput device names. On Windows RawInput returns mostly uppercase names (except the GUID part) and we want to keep Wine's old behavior in this regards as SDL 2.0.14+ looks for uppercase IG_ to match xinput devices to their RawInput counterparts. Signed-off-by: Arkadiusz Hiler --- dlls/user32/rawinput.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c index ba11a121bc5..13aac0278d5 100644 --- a/dlls/user32/rawinput.c +++ b/dlls/user32/rawinput.c @@ -94,7 +94,7 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface) SP_DEVICE_INTERFACE_DETAIL_DATA_W *detail; struct device *device; HANDLE file; - WCHAR *path; + WCHAR *path, *pos; DWORD size; SetupDiGetDeviceInterfaceDetailW(set, iface, NULL, 0, &size, NULL); @@ -121,6 +121,9 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface) } heap_free(detail); + /* upper case everything but the GUID */ + for (pos = path; *pos && *pos != '{'; pos++) *pos = towupper(*pos); + file = CreateFileW(path, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); if (file == INVALID_HANDLE_VALUE) -- 2.30.1