Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/user32/rawinput.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c index a014066f988..961efecd075 100644 --- a/dlls/user32/rawinput.c +++ b/dlls/user32/rawinput.c @@ -177,7 +177,6 @@ void rawinput_update_device_list(void) SP_DEVICE_INTERFACE_DATA iface = { sizeof(iface) }; struct device *device; HIDD_ATTRIBUTES attr; - HIDP_CAPS caps; GUID hid_guid; HDEVINFO set; DWORD idx; @@ -201,6 +200,8 @@ void rawinput_update_device_list(void)
for (idx = 0; SetupDiEnumDeviceInterfaces(set, NULL, &hid_guid, idx, &iface); ++idx) { + const struct hid_preparsed_data *preparsed; + if (!(device = add_device(set, &iface))) continue;
@@ -215,12 +216,10 @@ void rawinput_update_device_list(void)
if (!HidD_GetPreparsedData(device->file, &device->data)) WARN("Failed to get preparsed data.\n"); + preparsed = (struct hid_preparsed_data *)device->data;
- if (!HidP_GetCaps(device->data, &caps)) - WARN("Failed to get caps.\n"); - - device->info.hid.usUsagePage = caps.UsagePage; - device->info.hid.usUsage = caps.Usage; + device->info.hid.usUsagePage = preparsed->usage_page; + device->info.hid.usUsage = preparsed->usage; }
SetupDiDestroyDeviceInfoList(set);