Skip to content
Snippets Groups Projects
Commit a60c5e69 authored by Arek Hiler's avatar Arek Hiler Committed by Alexandre Julliard
Browse files

user32: Uppercase the RawInput device names sans the GUID.


This is a preparation for a patch that changes setupapi to return lowercased
device paths, which is the source of RawInput device name here. On Windows
RawInput returns mostly uppercase names (except the GUID) and we want to keep
that behavior.

Signed-off-by: default avatarRémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent f6482d1c
No related branches found
No related tags found
No related merge requests found
......@@ -101,6 +101,7 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
struct device *device = NULL;
UINT32 handle;
HANDLE file;
WCHAR *pos;
DWORD i, size, type;
SetupDiGetDeviceInterfaceDetailW(set, iface, NULL, 0, &size, &device_data);
......@@ -125,6 +126,9 @@ static struct device *add_device(HDEVINFO set, SP_DEVICE_INTERFACE_DATA *iface)
detail->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W);
SetupDiGetDeviceInterfaceDetailW(set, iface, detail, size, NULL, NULL);
/* upper case everything but the GUID */
for (pos = detail->DevicePath; *pos && *pos != '{'; pos++) *pos = towupper(*pos);
file = CreateFileW(detail->DevicePath, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0);
if (file == INVALID_HANDLE_VALUE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment