Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
This series should not conflict with the other winebus.sys patches.
dlls/hid/hidp.c | 2 -- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 6 ++++++ dlls/xinput1_3/tests/xinput.c | 1 - 3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/hid/hidp.c b/dlls/hid/hidp.c index 2690b9b0f27..31f1b85f14a 100644 --- a/dlls/hid/hidp.c +++ b/dlls/hid/hidp.c @@ -328,7 +328,6 @@ NTSTATUS WINAPI HidP_GetUsages( HIDP_REPORT_TYPE report_type, USAGE usage_page, *usages_len = params.usages - usages; if (status != HIDP_STATUS_SUCCESS) return status;
- if (*usages_len == 0) return HIDP_STATUS_USAGE_NOT_FOUND; if (params.usages > params.usages_end) return HIDP_STATUS_BUFFER_TOO_SMALL; return status; } @@ -672,7 +671,6 @@ NTSTATUS WINAPI HidP_GetUsagesEx( HIDP_REPORT_TYPE report_type, USHORT collectio *usages_len = params.usages - usages; if (status != HIDP_STATUS_SUCCESS) return status;
- if (*usages_len == 0) return HIDP_STATUS_USAGE_NOT_FOUND; if (params.usages > params.usages_end) return HIDP_STATUS_BUFFER_TOO_SMALL; return status; } diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 40f9b8622e3..50e381c8983 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -2220,6 +2220,12 @@ static void test_hidp(HANDLE file, HANDLE async_file, int report_id, BOOL polled report, caps.InputReportByteLength); ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsages returned %#x\n", status);
+ value = ARRAY_SIZE(usages); + status = HidP_GetUsages(HidP_Input, HID_USAGE_PAGE_KEYBOARD, 0, usages, &value, preparsed_data, + report, caps.InputReportByteLength); + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetUsages returned %#x\n", status); + ok(value == 0, "got usage count %d, expected %d\n", value, 2); + usages[0] = 0x9; usages[1] = 0xb; usages[2] = 0xa; diff --git a/dlls/xinput1_3/tests/xinput.c b/dlls/xinput1_3/tests/xinput.c index 41769e23ec9..0c94bfed982 100644 --- a/dlls/xinput1_3/tests/xinput.c +++ b/dlls/xinput1_3/tests/xinput.c @@ -678,7 +678,6 @@ static void check_hid_caps(DWORD index, HANDLE device, PHIDP_PREPARSED_DATA pre
length = ARRAY_SIZE(usages); status = HidP_GetUsages(HidP_Input, HID_USAGE_PAGE_BUTTON, 0, usages, &length, preparsed, buffer, hid_caps->InputReportByteLength); - todo_wine ok(status == HIDP_STATUS_SUCCESS, "HidP_GetUsages returned %#x\n", status); ok(length == 0, "got length %u\n", length);
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winebus.sys/bus_udev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 090df3b0529..261d24d011b 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -618,7 +618,7 @@ static BOOL set_report_from_event(struct wine_input_private *ext, struct input_e return FALSE; #endif case EV_KEY: - set_button_value(ext->button_start + ext->button_map[ie->code], ie->value, ext->current_report_buffer); + set_button_value(ext->button_start * 8 + ext->button_map[ie->code], ie->value, ext->current_report_buffer); return FALSE; case EV_ABS: set_abs_axis_value(ext, ie->code, ie->value);
And use them for mouse and keyboard.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winebus.sys/Makefile.in | 1 + dlls/winebus.sys/controller.h | 20 ++++++++ dlls/winebus.sys/hid.c | 91 +++++++++++++++++++++++++++++++++++ dlls/winebus.sys/main.c | 41 ++++++++-------- 4 files changed, 134 insertions(+), 19 deletions(-) create mode 100644 dlls/winebus.sys/hid.c
diff --git a/dlls/winebus.sys/Makefile.in b/dlls/winebus.sys/Makefile.in index 9011bbb6075..8cde3c7b422 100644 --- a/dlls/winebus.sys/Makefile.in +++ b/dlls/winebus.sys/Makefile.in @@ -8,6 +8,7 @@ C_SRCS = \ bus_iohid.c \ bus_sdl.c \ bus_udev.c \ + hid.c \ main.c
RC_SRCS = winebus.rc diff --git a/dlls/winebus.sys/controller.h b/dlls/winebus.sys/controller.h index 2f4a72a94cd..aa838129ce2 100644 --- a/dlls/winebus.sys/controller.h +++ b/dlls/winebus.sys/controller.h @@ -18,6 +18,26 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#include <stdarg.h> + +#include <windef.h> +#include <winbase.h> +#include <hidusage.h> + +struct hid_descriptor +{ + BYTE *data; + SIZE_T size; + SIZE_T max_size; +}; + +extern BOOL hid_descriptor_append(struct hid_descriptor *desc, const BYTE *buffer, SIZE_T size) DECLSPEC_HIDDEN; +extern BOOL hid_descriptor_begin(struct hid_descriptor *desc, USAGE usage_page, USAGE usage) DECLSPEC_HIDDEN; +extern BOOL hid_descriptor_end(struct hid_descriptor *desc) DECLSPEC_HIDDEN; + +extern BOOL hid_descriptor_add_buttons(struct hid_descriptor *desc, USAGE usage_page, + USAGE usage_min, USAGE usage_max) DECLSPEC_HIDDEN; + /* Blocks of data for building HID device descriptions */
#include "psh_hid_macros.h" diff --git a/dlls/winebus.sys/hid.c b/dlls/winebus.sys/hid.c new file mode 100644 index 00000000000..052037ec19e --- /dev/null +++ b/dlls/winebus.sys/hid.c @@ -0,0 +1,91 @@ +/* + * Common HID report descriptor helpers + * + * Copyright 2021 Rémi Bernon for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "controller.h" + +BOOL hid_descriptor_append(struct hid_descriptor *desc, const BYTE *buffer, SIZE_T size) +{ + BYTE *tmp = desc->data; + + if (desc->size + size > desc->max_size) + { + desc->max_size = max(desc->max_size * 3 / 2, desc->size + size); + if (!desc->data) desc->data = HeapAlloc(GetProcessHeap(), 0, desc->max_size); + else desc->data = HeapReAlloc(GetProcessHeap(), 0, tmp, desc->max_size); + } + + if (!desc->data) + { + HeapFree(GetProcessHeap(), 0, tmp); + return FALSE; + } + + memcpy(desc->data + desc->size, buffer, size); + desc->size += size; + return TRUE; +} + +#include "psh_hid_macros.h" + +BOOL hid_descriptor_begin(struct hid_descriptor *desc, USAGE usage_page, USAGE usage) +{ + const BYTE template[] = + { + USAGE_PAGE(2, usage_page), + USAGE(2, usage), + COLLECTION(1, Application), + USAGE(1, 0), + }; + + memset(desc, 0, sizeof(*desc)); + return hid_descriptor_append(desc, template, sizeof(template)); +} + +BOOL hid_descriptor_end(struct hid_descriptor *desc) +{ + static const BYTE template[] = + { + END_COLLECTION, + }; + + return hid_descriptor_append(desc, template, sizeof(template)); +} + +BOOL hid_descriptor_add_buttons(struct hid_descriptor *desc, USAGE usage_page, + USAGE usage_min, USAGE usage_max) +{ + const BYTE template[] = + { + USAGE_PAGE(2, usage_page), + USAGE_MINIMUM(2, usage_min), + USAGE_MAXIMUM(2, usage_max), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 1), + PHYSICAL_MINIMUM(1, 0), + PHYSICAL_MAXIMUM(1, 1), + REPORT_COUNT(2, usage_max - usage_min + 1), + REPORT_SIZE(1, 1), + INPUT(1, Data|Var|Abs), + }; + + return hid_descriptor_append(desc, template, sizeof(template)); +} + +#include "pop_hid_macros.h" diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index 6ceccd21442..84885bdcce9 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -94,7 +94,9 @@ static const struct product_desc XBOX_CONTROLLERS[] = { static DRIVER_OBJECT *driver_obj;
static DEVICE_OBJECT *mouse_obj; +static struct hid_descriptor mouse_desc; static DEVICE_OBJECT *keyboard_obj; +static struct hid_descriptor keyboard_desc;
/* The root-enumerated device stack. */ DEVICE_OBJECT *bus_pdo; @@ -483,16 +485,10 @@ static NTSTATUS mouse_get_reportdescriptor(DEVICE_OBJECT *device, BYTE *buffer, { TRACE("buffer %p, length %u.\n", buffer, length);
- *ret_length = sizeof(REPORT_HEADER) + sizeof(REPORT_BUTTONS) + sizeof(REPORT_TAIL); - if (length < sizeof(REPORT_HEADER) + sizeof(REPORT_BUTTONS) + sizeof(REPORT_TAIL)) - return STATUS_BUFFER_TOO_SMALL; - - memcpy(buffer, REPORT_HEADER, sizeof(REPORT_HEADER)); - add_button_block(buffer + sizeof(REPORT_HEADER), 1, 3); - memcpy(buffer + sizeof(REPORT_HEADER) + sizeof(REPORT_BUTTONS), REPORT_TAIL, sizeof(REPORT_TAIL)); - buffer[IDX_HEADER_PAGE] = HID_USAGE_PAGE_GENERIC; - buffer[IDX_HEADER_USAGE] = HID_USAGE_GENERIC_MOUSE; + *ret_length = mouse_desc.size; + if (length < mouse_desc.size) return STATUS_BUFFER_TOO_SMALL;
+ memcpy(buffer, mouse_desc.data, mouse_desc.size); return STATUS_SUCCESS; }
@@ -545,6 +541,13 @@ static void mouse_device_create(void) { static const WCHAR busidW[] = {'W','I','N','E','M','O','U','S','E',0};
+ if (!hid_descriptor_begin(&mouse_desc, HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_MOUSE)) + return; + if (!hid_descriptor_add_buttons(&mouse_desc, HID_USAGE_PAGE_BUTTON, 1, 3)) + return; + if (!hid_descriptor_end(&mouse_desc)) + return; + mouse_obj = bus_create_hid_device(busidW, 0, 0, -1, 0, 0, busidW, FALSE, &mouse_vtbl, 0); IoInvalidateDeviceRelations(bus_pdo, BusRelations); } @@ -557,17 +560,10 @@ static NTSTATUS keyboard_get_reportdescriptor(DEVICE_OBJECT *device, BYTE *buffe { TRACE("buffer %p, length %u.\n", buffer, length);
- *ret_length = sizeof(REPORT_HEADER) + sizeof(REPORT_BUTTONS) + sizeof(REPORT_TAIL); - if (length < sizeof(REPORT_HEADER) + sizeof(REPORT_BUTTONS) + sizeof(REPORT_TAIL)) - return STATUS_BUFFER_TOO_SMALL; - - memcpy(buffer, REPORT_HEADER, sizeof(REPORT_HEADER)); - add_button_block(buffer + sizeof(REPORT_HEADER), 0, 101); - buffer[sizeof(REPORT_HEADER) + IDX_BUTTON_USAGE_PAGE] = HID_USAGE_PAGE_KEYBOARD; - memcpy(buffer + sizeof(REPORT_HEADER) + sizeof(REPORT_BUTTONS), REPORT_TAIL, sizeof(REPORT_TAIL)); - buffer[IDX_HEADER_PAGE] = HID_USAGE_PAGE_GENERIC; - buffer[IDX_HEADER_USAGE] = HID_USAGE_GENERIC_KEYBOARD; + *ret_length = keyboard_desc.size; + if (length < keyboard_desc.size) return STATUS_BUFFER_TOO_SMALL;
+ memcpy(buffer, keyboard_desc.data, keyboard_desc.size); return STATUS_SUCCESS; }
@@ -620,6 +616,13 @@ static void keyboard_device_create(void) { static const WCHAR busidW[] = {'W','I','N','E','K','E','Y','B','O','A','R','D',0};
+ if (!hid_descriptor_begin(&keyboard_desc, HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_KEYBOARD)) + return; + if (!hid_descriptor_add_buttons(&keyboard_desc, HID_USAGE_PAGE_KEYBOARD, 0, 101)) + return; + if (!hid_descriptor_end(&keyboard_desc)) + return; + keyboard_obj = bus_create_hid_device(busidW, 0, 0, -1, 0, 0, busidW, FALSE, &keyboard_vtbl, 0); IoInvalidateDeviceRelations(bus_pdo, BusRelations); }
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winebus.sys/bus_udev.c | 147 +++++++++------------------------- dlls/winebus.sys/controller.h | 5 ++ dlls/winebus.sys/hid.c | 121 ++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+), 111 deletions(-)
diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 261d24d011b..f9469399202 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -112,25 +112,6 @@ static inline struct platform_private *impl_from_DEVICE_OBJECT(DEVICE_OBJECT *de
#ifdef HAS_PROPER_INPUT_HEADER
-#include "psh_hid_macros.h" - -static const BYTE REPORT_ABS_AXIS_TAIL[] = { - LOGICAL_MINIMUM(4, /* placeholder */ 0x00000000), - LOGICAL_MAXIMUM(4, /* placeholder */ 0x000000ff), - PHYSICAL_MINIMUM(4, /* placeholder */ 0x00000000), - PHYSICAL_MAXIMUM(4, /* placeholder */ 0x000000ff), - REPORT_SIZE(1, 32), - REPORT_COUNT(1, /* placeholder */ 0), - INPUT(1, Data|Var|Abs), -}; -#define IDX_ABS_LOG_MINIMUM 1 -#define IDX_ABS_LOG_MAXIMUM 6 -#define IDX_ABS_PHY_MINIMUM 11 -#define IDX_ABS_PHY_MAXIMUM 16 -#define IDX_ABS_AXIS_COUNT 23 - -#include "pop_hid_macros.h" - static const BYTE ABS_TO_HID_MAP[][2] = { {HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_X}, /*ABS_X*/ {HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_Y}, /*ABS_Y*/ @@ -199,8 +180,7 @@ struct wine_input_private { BYTE *current_report_buffer; enum { FIRST, NORMAL, DROPPED } report_state;
- int report_descriptor_size; - BYTE *report_descriptor; + struct hid_descriptor desc;
int button_start; BYTE button_map[KEY_MAX]; @@ -212,40 +192,6 @@ struct wine_input_private {
#define test_bit(arr,bit) (((BYTE*)(arr))[(bit)>>3]&(1<<((bit)&7)))
-static BYTE *add_axis_block(BYTE *report_ptr, BYTE count, BYTE page, BYTE *usages, BOOL absolute, const struct wine_input_absinfo *absinfo) -{ - int i; - memcpy(report_ptr, REPORT_AXIS_HEADER, sizeof(REPORT_AXIS_HEADER)); - report_ptr[IDX_AXIS_PAGE] = page; - report_ptr += sizeof(REPORT_AXIS_HEADER); - for (i = 0; i < count; i++) - { - memcpy(report_ptr, REPORT_AXIS_USAGE, sizeof(REPORT_AXIS_USAGE)); - report_ptr[IDX_AXIS_USAGE] = usages[i]; - report_ptr += sizeof(REPORT_AXIS_USAGE); - } - if (absolute) - { - memcpy(report_ptr, REPORT_ABS_AXIS_TAIL, sizeof(REPORT_ABS_AXIS_TAIL)); - if (absinfo) - { - *((int*)&report_ptr[IDX_ABS_LOG_MINIMUM]) = LE_DWORD(absinfo->info.minimum); - *((int*)&report_ptr[IDX_ABS_LOG_MAXIMUM]) = LE_DWORD(absinfo->info.maximum); - *((int*)&report_ptr[IDX_ABS_PHY_MINIMUM]) = LE_DWORD(absinfo->info.minimum); - *((int*)&report_ptr[IDX_ABS_PHY_MAXIMUM]) = LE_DWORD(absinfo->info.maximum); - } - report_ptr[IDX_ABS_AXIS_COUNT] = count; - report_ptr += sizeof(REPORT_ABS_AXIS_TAIL); - } - else - { - memcpy(report_ptr, REPORT_REL_AXIS_TAIL, sizeof(REPORT_REL_AXIS_TAIL)); - report_ptr[IDX_REL_AXIS_COUNT] = count; - report_ptr += sizeof(REPORT_REL_AXIS_TAIL); - } - return report_ptr; -} - static const BYTE* what_am_I(struct udev_device *dev) { static const BYTE Unknown[2] = {HID_USAGE_PAGE_GENERIC, 0}; @@ -408,8 +354,7 @@ static BOOL build_report_descriptor(struct wine_input_private *ext, struct udev_ int rel_pages[TOP_REL_PAGE][HID_REL_MAX+1]; BYTE absbits[(ABS_MAX+7)/8]; BYTE relbits[(REL_MAX+7)/8]; - BYTE *report_ptr; - INT i, descript_size; + INT i; INT report_size; INT button_count, abs_count, rel_count, hat_count; const BYTE *device_usage = what_am_I(dev); @@ -425,7 +370,6 @@ static BOOL build_report_descriptor(struct wine_input_private *ext, struct udev_ return FALSE; }
- descript_size = sizeof(REPORT_HEADER) + sizeof(REPORT_TAIL); report_size = 0;
abs_count = 0; @@ -443,7 +387,6 @@ static BOOL build_report_descriptor(struct wine_input_private *ext, struct udev_ if (abs_pages[i][0] > 0) { int j; - descript_size += sizeof(REPORT_AXIS_USAGE) * abs_pages[i][0]; for (j = 1; j <= abs_pages[i][0]; j++) { ext->abs_map[abs_pages[i][j]].report_index = report_size; @@ -451,8 +394,6 @@ static BOOL build_report_descriptor(struct wine_input_private *ext, struct udev_ } abs_count++; } - descript_size += sizeof(REPORT_AXIS_HEADER) * abs_count; - descript_size += sizeof(REPORT_ABS_AXIS_TAIL) * abs_count;
rel_count = 0; memset(rel_pages, 0, sizeof(rel_pages)); @@ -467,7 +408,6 @@ static BOOL build_report_descriptor(struct wine_input_private *ext, struct udev_ if (rel_pages[i][0] > 0) { int j; - descript_size += sizeof(REPORT_AXIS_USAGE) * rel_pages[i][0]; for (j = 1; j <= rel_pages[i][0]; j++) { ext->rel_map[rel_pages[i][j]] = report_size; @@ -475,17 +415,12 @@ static BOOL build_report_descriptor(struct wine_input_private *ext, struct udev_ } rel_count++; } - descript_size += sizeof(REPORT_AXIS_HEADER) * rel_count; - descript_size += sizeof(REPORT_REL_AXIS_TAIL) * rel_count;
/* For now lump all buttons just into incremental usages, Ignore Keys */ ext->button_start = report_size; button_count = count_buttons(ext->base.device_fd, ext->button_map); if (button_count) { - descript_size += sizeof(REPORT_BUTTONS); - if (button_count % 8) - descript_size += sizeof(REPORT_PADDING); report_size += (button_count + 7) / 8; }
@@ -499,35 +434,26 @@ static BOOL build_report_descriptor(struct wine_input_private *ext, struct udev_ report_size++; hat_count++; } - if (hat_count > 0) - descript_size += sizeof(REPORT_HATSWITCH);
- TRACE("Report Descriptor will be %i bytes\n", descript_size); TRACE("Report will be %i bytes\n", report_size);
- ext->report_descriptor = HeapAlloc(GetProcessHeap(), 0, descript_size); - if (!ext->report_descriptor) - { - ERR("Failed to alloc report descriptor\n"); + if (!hid_descriptor_begin(&ext->desc, device_usage[0], device_usage[1])) return FALSE; - } - report_ptr = ext->report_descriptor;
- memcpy(report_ptr, REPORT_HEADER, sizeof(REPORT_HEADER)); - report_ptr[IDX_HEADER_PAGE] = device_usage[0]; - report_ptr[IDX_HEADER_USAGE] = device_usage[1]; - report_ptr += sizeof(REPORT_HEADER); if (abs_count) { for (i = 1; i < TOP_ABS_PAGE; i++) { if (abs_pages[i][0]) { - BYTE usages[HID_ABS_MAX]; + USAGE usages[HID_ABS_MAX]; int j; for (j = 0; j < abs_pages[i][0]; j++) usages[j] = ABS_TO_HID_MAP[abs_pages[i][j+1]][1]; - report_ptr = add_axis_block(report_ptr, abs_pages[i][0], i, usages, TRUE, &ext->abs_map[abs_pages[i][1]]); + if (!hid_descriptor_add_axes(&ext->desc, abs_pages[i][0], i, usages, FALSE, 32, + LE_DWORD(ext->abs_map[abs_pages[i][1]].info.minimum), + LE_DWORD(ext->abs_map[abs_pages[i][1]].info.maximum))) + return FALSE; } } } @@ -537,45 +463,41 @@ static BOOL build_report_descriptor(struct wine_input_private *ext, struct udev_ { if (rel_pages[i][0]) { - BYTE usages[HID_REL_MAX]; + USAGE usages[HID_REL_MAX]; int j; for (j = 0; j < rel_pages[i][0]; j++) usages[j] = REL_TO_HID_MAP[rel_pages[i][j+1]][1]; - report_ptr = add_axis_block(report_ptr, rel_pages[i][0], i, usages, FALSE, NULL); + if (!hid_descriptor_add_axes(&ext->desc, rel_pages[i][0], i, usages, TRUE, 8, 0x81, 0x7f)) + return FALSE; } } } if (button_count) { - report_ptr = add_button_block(report_ptr, 1, button_count); + if (!hid_descriptor_add_buttons(&ext->desc, HID_USAGE_PAGE_BUTTON, 1, button_count)) + return FALSE; + if (button_count % 8) { BYTE padding = 8 - (button_count % 8); - report_ptr = add_padding_block(report_ptr, padding); + if (!hid_descriptor_add_padding(&ext->desc, padding)) + return FALSE; } } if (hat_count) - report_ptr = add_hatswitch(report_ptr, hat_count); - - memcpy(report_ptr, REPORT_TAIL, sizeof(REPORT_TAIL)); - - ext->report_descriptor_size = descript_size; - ext->buffer_length = report_size; - ext->current_report_buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, report_size); - if (ext->current_report_buffer == NULL) { - ERR("Failed to alloc report buffer\n"); - HeapFree(GetProcessHeap(), 0, ext->report_descriptor); - return FALSE; + if (!hid_descriptor_add_hatswitch(&ext->desc, hat_count)) + return FALSE; } - ext->last_report_buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, report_size); - if (ext->last_report_buffer == NULL) - { - ERR("Failed to alloc report buffer\n"); - HeapFree(GetProcessHeap(), 0, ext->report_descriptor); - HeapFree(GetProcessHeap(), 0, ext->current_report_buffer); + + if (!hid_descriptor_end(&ext->desc)) return FALSE; - } + + ext->buffer_length = report_size; + if (!(ext->current_report_buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, report_size))) + goto failed; + if (!(ext->last_report_buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, report_size))) + goto failed; ext->report_state = FIRST;
/* Initialize axis in the report */ @@ -584,6 +506,12 @@ static BOOL build_report_descriptor(struct wine_input_private *ext, struct udev_ set_abs_axis_value(ext, i, ext->abs_map[i].info.value);
return TRUE; + +failed: + HeapFree(GetProcessHeap(), 0, ext->current_report_buffer); + HeapFree(GetProcessHeap(), 0, ext->last_report_buffer); + hid_descriptor_free(&ext->desc); + return FALSE; }
static BOOL set_report_from_event(struct wine_input_private *ext, struct input_event *ie) @@ -972,7 +900,7 @@ static void lnxev_free_device(DEVICE_OBJECT *device)
HeapFree(GetProcessHeap(), 0, ext->current_report_buffer); HeapFree(GetProcessHeap(), 0, ext->last_report_buffer); - HeapFree(GetProcessHeap(), 0, ext->report_descriptor); + hid_descriptor_free(&ext->desc);
close(ext->base.device_fd); udev_device_unref(ext->base.udev_device); @@ -982,13 +910,10 @@ static NTSTATUS lnxev_get_reportdescriptor(DEVICE_OBJECT *device, BYTE *buffer, { struct wine_input_private *ext = input_impl_from_DEVICE_OBJECT(device);
- *out_length = ext->report_descriptor_size; - - if (length < ext->report_descriptor_size) - return STATUS_BUFFER_TOO_SMALL; - - memcpy(buffer, ext->report_descriptor, ext->report_descriptor_size); + *out_length = ext->desc.size; + if (length < ext->desc.size) return STATUS_BUFFER_TOO_SMALL;
+ memcpy(buffer, ext->desc.data, ext->desc.size); return STATUS_SUCCESS; }
diff --git a/dlls/winebus.sys/controller.h b/dlls/winebus.sys/controller.h index aa838129ce2..b03338841e8 100644 --- a/dlls/winebus.sys/controller.h +++ b/dlls/winebus.sys/controller.h @@ -34,9 +34,14 @@ struct hid_descriptor extern BOOL hid_descriptor_append(struct hid_descriptor *desc, const BYTE *buffer, SIZE_T size) DECLSPEC_HIDDEN; extern BOOL hid_descriptor_begin(struct hid_descriptor *desc, USAGE usage_page, USAGE usage) DECLSPEC_HIDDEN; extern BOOL hid_descriptor_end(struct hid_descriptor *desc) DECLSPEC_HIDDEN; +extern void hid_descriptor_free(struct hid_descriptor *desc) DECLSPEC_HIDDEN;
extern BOOL hid_descriptor_add_buttons(struct hid_descriptor *desc, USAGE usage_page, USAGE usage_min, USAGE usage_max) DECLSPEC_HIDDEN; +extern BOOL hid_descriptor_add_padding(struct hid_descriptor *desc, BYTE bitcount) DECLSPEC_HIDDEN; +extern BOOL hid_descriptor_add_hatswitch(struct hid_descriptor *desc, INT count) DECLSPEC_HIDDEN; +extern BOOL hid_descriptor_add_axes(struct hid_descriptor *desc, BYTE count, USAGE usage_page, + const USAGE *usages, BOOL rel, INT size, LONG min, LONG max) DECLSPEC_HIDDEN;
/* Blocks of data for building HID device descriptions */
diff --git a/dlls/winebus.sys/hid.c b/dlls/winebus.sys/hid.c index 052037ec19e..86c27d3eded 100644 --- a/dlls/winebus.sys/hid.c +++ b/dlls/winebus.sys/hid.c @@ -44,6 +44,16 @@ BOOL hid_descriptor_append(struct hid_descriptor *desc, const BYTE *buffer, SIZE
#include "psh_hid_macros.h"
+static BOOL hid_descriptor_append_usage(struct hid_descriptor *desc, USAGE usage) +{ + const BYTE template[] = + { + USAGE(2, usage), + }; + + return hid_descriptor_append(desc, template, sizeof(template)); +} + BOOL hid_descriptor_begin(struct hid_descriptor *desc, USAGE usage_page, USAGE usage) { const BYTE template[] = @@ -68,6 +78,11 @@ BOOL hid_descriptor_end(struct hid_descriptor *desc) return hid_descriptor_append(desc, template, sizeof(template)); }
+void hid_descriptor_free(struct hid_descriptor *desc) +{ + HeapFree(GetProcessHeap(), 0, desc->data); +} + BOOL hid_descriptor_add_buttons(struct hid_descriptor *desc, USAGE usage_page, USAGE usage_min, USAGE usage_max) { @@ -88,4 +103,110 @@ BOOL hid_descriptor_add_buttons(struct hid_descriptor *desc, USAGE usage_page, return hid_descriptor_append(desc, template, sizeof(template)); }
+BOOL hid_descriptor_add_padding(struct hid_descriptor *desc, BYTE bitcount) +{ + const BYTE template[] = + { + REPORT_COUNT(1, bitcount), + REPORT_SIZE(1, 1), + INPUT(1, Cnst|Var|Abs), + }; + + return hid_descriptor_append(desc, template, sizeof(template)); +} + +BOOL hid_descriptor_add_hatswitch(struct hid_descriptor *desc, INT count) +{ + const BYTE template[] = + { + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_HATSWITCH), + LOGICAL_MINIMUM(1, 1), + LOGICAL_MAXIMUM(1, 8), + PHYSICAL_MINIMUM(1, 0), + PHYSICAL_MAXIMUM(2, 8), + REPORT_SIZE(1, 4), + REPORT_COUNT(4, count), + UNIT(1, 0x0e /* none */), + INPUT(1, Data|Var|Abs|Null), + }; + + return hid_descriptor_append(desc, template, sizeof(template)); +} + +BOOL hid_descriptor_add_axes(struct hid_descriptor *desc, BYTE count, USAGE usage_page, + const USAGE *usages, BOOL rel, INT size, LONG min, LONG max) +{ + const BYTE template_begin[] = + { + USAGE_PAGE(1, usage_page), + COLLECTION(1, Physical), + }; + const BYTE template_end[] = + { + END_COLLECTION, + }; + const BYTE template_1[] = + { + LOGICAL_MINIMUM(1, min), + LOGICAL_MAXIMUM(1, max), + PHYSICAL_MINIMUM(1, min), + PHYSICAL_MAXIMUM(1, max), + REPORT_SIZE(1, size), + REPORT_COUNT(1, count), + INPUT(1, Data|Var|(rel ? Rel : Abs)), + }; + const BYTE template_2[] = + { + LOGICAL_MINIMUM(2, min), + LOGICAL_MAXIMUM(2, max), + PHYSICAL_MINIMUM(2, min), + PHYSICAL_MAXIMUM(2, max), + REPORT_SIZE(1, size), + REPORT_COUNT(1, count), + INPUT(1, Data|Var|(rel ? Rel : Abs)), + }; + const BYTE template_4[] = + { + LOGICAL_MINIMUM(4, min), + LOGICAL_MAXIMUM(4, max), + PHYSICAL_MINIMUM(4, min), + PHYSICAL_MAXIMUM(4, max), + REPORT_SIZE(1, size), + REPORT_COUNT(1, count), + INPUT(1, Data|Var|(rel ? Rel : Abs)), + }; + int i; + + if (!hid_descriptor_append(desc, template_begin, sizeof(template_begin))) + return FALSE; + + for (i = 0; i < count; i++) + { + if (!hid_descriptor_append_usage(desc, usages[i])) + return FALSE; + } + + if (size >= 16) + { + if (!hid_descriptor_append(desc, template_4, sizeof(template_4))) + return FALSE; + } + else if (size >= 8) + { + if (!hid_descriptor_append(desc, template_2, sizeof(template_2))) + return FALSE; + } + else + { + if (!hid_descriptor_append(desc, template_1, sizeof(template_1))) + return FALSE; + } + + if (!hid_descriptor_append(desc, template_end, sizeof(template_end))) + return FALSE; + + return TRUE; +} + #include "pop_hid_macros.h"
And remove old helpers.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winebus.sys/bus.h | 29 ++++ dlls/winebus.sys/bus_sdl.c | 315 ++++++++++------------------------ dlls/winebus.sys/bus_udev.c | 1 - dlls/winebus.sys/controller.h | 145 ---------------- dlls/winebus.sys/hid.c | 38 +++- dlls/winebus.sys/main.c | 1 - dlls/xinput1_3/tests/xinput.c | 13 +- 7 files changed, 157 insertions(+), 385 deletions(-) delete mode 100644 dlls/winebus.sys/controller.h
diff --git a/dlls/winebus.sys/bus.h b/dlls/winebus.sys/bus.h index a157f576ef9..bf2e157af4d 100644 --- a/dlls/winebus.sys/bus.h +++ b/dlls/winebus.sys/bus.h @@ -16,6 +16,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#include <stdarg.h> + +#include <windef.h> +#include <winbase.h> +#include <winternl.h> +#include <ddk/wdm.h> +#include <hidusage.h> + typedef int(*enum_func)(DEVICE_OBJECT *device, void *context);
/* Buses */ @@ -57,3 +65,24 @@ BOOL is_xbox_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN;
extern HANDLE driver_key DECLSPEC_HIDDEN; extern DEVICE_OBJECT *bus_pdo DECLSPEC_HIDDEN; + +struct hid_descriptor +{ + BYTE *data; + SIZE_T size; + SIZE_T max_size; +}; + +extern BOOL hid_descriptor_append(struct hid_descriptor *desc, const BYTE *buffer, SIZE_T size) DECLSPEC_HIDDEN; +extern BOOL hid_descriptor_begin(struct hid_descriptor *desc, USAGE usage_page, USAGE usage) DECLSPEC_HIDDEN; +extern BOOL hid_descriptor_end(struct hid_descriptor *desc) DECLSPEC_HIDDEN; +extern void hid_descriptor_free(struct hid_descriptor *desc) DECLSPEC_HIDDEN; + +extern BOOL hid_descriptor_add_buttons(struct hid_descriptor *desc, USAGE usage_page, + USAGE usage_min, USAGE usage_max) DECLSPEC_HIDDEN; +extern BOOL hid_descriptor_add_padding(struct hid_descriptor *desc, BYTE bitcount) DECLSPEC_HIDDEN; +extern BOOL hid_descriptor_add_hatswitch(struct hid_descriptor *desc, INT count) DECLSPEC_HIDDEN; +extern BOOL hid_descriptor_add_axes(struct hid_descriptor *desc, BYTE count, USAGE usage_page, + const USAGE *usages, BOOL rel, INT size, LONG min, LONG max) DECLSPEC_HIDDEN; + +extern BOOL hid_descriptor_add_haptics(struct hid_descriptor *desc) DECLSPEC_HIDDEN; diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index 1580ba5ef92..572b46b4114 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -43,7 +43,6 @@ #include "wine/debug.h" #include "wine/unicode.h" #include "hidusage.h" -#include "controller.h"
#ifdef WORDS_BIGENDIAN # define LE_WORD(x) RtlUshortByteSwap(x) @@ -121,8 +120,7 @@ struct platform_private int ball_start; int hat_bit_offs; /* hatswitches are reported in the same bytes as buttons */
- int report_descriptor_size; - BYTE *report_descriptor; + struct hid_descriptor desc;
int buffer_length; BYTE *report_buffer; @@ -136,116 +134,10 @@ static inline struct platform_private *impl_from_DEVICE_OBJECT(DEVICE_OBJECT *de return (struct platform_private *)get_platform_private(device); }
-#include "psh_hid_macros.h" - -static const BYTE REPORT_AXIS_TAIL[] = { - LOGICAL_MINIMUM(4, 0x00000000), - LOGICAL_MAXIMUM(4, 0x0000ffff), - PHYSICAL_MINIMUM(4, 0x00000000), - PHYSICAL_MAXIMUM(4, 0x0000ffff), - REPORT_SIZE(1, 16), - REPORT_COUNT(1, /* placeholder */ 0), - INPUT(1, Data|Var|Abs), -}; -#define IDX_ABS_AXIS_COUNT 23 - #define CONTROLLER_NUM_BUTTONS 11 - -static const BYTE CONTROLLER_BUTTONS[] = { - USAGE_PAGE(1, HID_USAGE_PAGE_BUTTON), - USAGE_MINIMUM(1, 1), - USAGE_MAXIMUM(1, CONTROLLER_NUM_BUTTONS), - LOGICAL_MINIMUM(1, 0), - LOGICAL_MAXIMUM(1, 1), - PHYSICAL_MINIMUM(1, 0), - PHYSICAL_MAXIMUM(1, 1), - REPORT_COUNT(1, CONTROLLER_NUM_BUTTONS), - REPORT_SIZE(1, 1), - INPUT(1, Data|Var|Abs), -}; - -static const BYTE CONTROLLER_AXIS [] = { - USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), - USAGE(1, HID_USAGE_GENERIC_X), - USAGE(1, HID_USAGE_GENERIC_Y), - USAGE(1, HID_USAGE_GENERIC_RX), - USAGE(1, HID_USAGE_GENERIC_RY), - LOGICAL_MINIMUM(4, 0x00000000), - LOGICAL_MAXIMUM(4, 0x0000ffff), - PHYSICAL_MINIMUM(4, 0x00000000), - PHYSICAL_MAXIMUM(4, 0x0000ffff), - REPORT_SIZE(1, 16), - REPORT_COUNT(1, 4), - INPUT(1, Data|Var|Abs), -}; - -static const BYTE CONTROLLER_TRIGGERS [] = { - USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), - USAGE(1, HID_USAGE_GENERIC_Z), - USAGE(1, HID_USAGE_GENERIC_RZ), - LOGICAL_MINIMUM(2, 0x0000), - LOGICAL_MAXIMUM(2, 0x7fff), - PHYSICAL_MINIMUM(2, 0x0000), - PHYSICAL_MAXIMUM(2, 0x7fff), - REPORT_SIZE(1, 16), - REPORT_COUNT(1, 2), - INPUT(1, Data|Var|Abs), -}; - #define CONTROLLER_NUM_AXES 6 - #define CONTROLLER_NUM_HATSWITCHES 1
-static const BYTE HAPTIC_RUMBLE[] = { - USAGE_PAGE(2, HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN), - USAGE(1, 0x01), - /* padding */ - REPORT_COUNT(1, 0x02), - REPORT_SIZE(1, 0x08), - OUTPUT(1, Data|Var|Abs), - /* actuators */ - LOGICAL_MINIMUM(1, 0x00), - LOGICAL_MAXIMUM(1, 0xff), - PHYSICAL_MINIMUM(1, 0x00), - PHYSICAL_MAXIMUM(1, 0xff), - REPORT_SIZE(1, 0x08), - REPORT_COUNT(1, 0x02), - OUTPUT(1, Data|Var|Abs), - /* padding */ - REPORT_COUNT(1, 0x02), - REPORT_SIZE(1, 0x08), - OUTPUT(1, Data|Var|Abs), -}; - -#include "pop_hid_macros.h" - -static BYTE *add_axis_block(BYTE *report_ptr, BYTE count, BYTE page, const BYTE *usages, BOOL absolute) -{ - int i; - memcpy(report_ptr, REPORT_AXIS_HEADER, sizeof(REPORT_AXIS_HEADER)); - report_ptr[IDX_AXIS_PAGE] = page; - report_ptr += sizeof(REPORT_AXIS_HEADER); - for (i = 0; i < count; i++) - { - memcpy(report_ptr, REPORT_AXIS_USAGE, sizeof(REPORT_AXIS_USAGE)); - report_ptr[IDX_AXIS_USAGE] = usages[i]; - report_ptr += sizeof(REPORT_AXIS_USAGE); - } - if (absolute) - { - memcpy(report_ptr, REPORT_AXIS_TAIL, sizeof(REPORT_AXIS_TAIL)); - report_ptr[IDX_ABS_AXIS_COUNT] = count; - report_ptr += sizeof(REPORT_AXIS_TAIL); - } - else - { - memcpy(report_ptr, REPORT_REL_AXIS_TAIL, sizeof(REPORT_REL_AXIS_TAIL)); - report_ptr[IDX_REL_AXIS_COUNT] = count; - report_ptr += sizeof(REPORT_REL_AXIS_TAIL); - } - return report_ptr; -} - static void set_button_value(struct platform_private *ext, int index, int value) { int byte_index = ext->button_start + index / 8; @@ -334,9 +226,8 @@ static void set_hat_value(struct platform_private *ext, int index, int value) } }
-static int test_haptic(struct platform_private *ext) +static BOOL descriptor_add_haptic(struct platform_private *ext) { - int rc = 0; if (pSDL_JoystickIsHaptic(ext->sdl_joystick)) { ext->sdl_haptic = pSDL_HapticOpenFromJoystick(ext->sdl_joystick); @@ -346,7 +237,8 @@ static int test_haptic(struct platform_private *ext) { pSDL_HapticStopAll(ext->sdl_haptic); pSDL_HapticRumbleInit(ext->sdl_haptic); - rc = sizeof(HAPTIC_RUMBLE); + if (!hid_descriptor_add_haptics(&ext->desc)) + return FALSE; ext->haptic_effect_id = -1; } else @@ -355,27 +247,17 @@ static int test_haptic(struct platform_private *ext) ext->sdl_haptic = NULL; } } - return rc; -}
-static int build_haptic(struct platform_private *ext, BYTE *report_ptr) -{ - if (ext->sdl_haptic) - { - memcpy(report_ptr, HAPTIC_RUMBLE, sizeof(HAPTIC_RUMBLE)); - return (sizeof(HAPTIC_RUMBLE)); - } - return 0; + return TRUE; }
static BOOL build_report_descriptor(struct platform_private *ext) { - BYTE *report_ptr; - INT i, descript_size; + INT i; INT report_size; INT button_count, axis_count, ball_count, hat_count; - static const BYTE device_usage[2] = {HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_GAMEPAD}; - static const BYTE controller_usages[] = { + static const USAGE device_usage[2] = {HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_GAMEPAD}; + static const USAGE controller_usages[] = { HID_USAGE_GENERIC_X, HID_USAGE_GENERIC_Y, HID_USAGE_GENERIC_Z, @@ -385,7 +267,7 @@ static BOOL build_report_descriptor(struct platform_private *ext) HID_USAGE_GENERIC_SLIDER, HID_USAGE_GENERIC_DIAL, HID_USAGE_GENERIC_WHEEL}; - static const BYTE joystick_usages[] = { + static const USAGE joystick_usages[] = { HID_USAGE_GENERIC_X, HID_USAGE_GENERIC_Y, HID_USAGE_GENERIC_Z, @@ -396,7 +278,6 @@ static BOOL build_report_descriptor(struct platform_private *ext) HID_USAGE_GENERIC_DIAL, HID_USAGE_GENERIC_WHEEL};
- descript_size = sizeof(REPORT_HEADER) + sizeof(REPORT_TAIL); report_size = 0;
axis_count = pSDL_JoystickNumAxes(ext->sdl_joystick); @@ -409,9 +290,6 @@ static BOOL build_report_descriptor(struct platform_private *ext) ext->axis_start = report_size; if (axis_count) { - descript_size += sizeof(REPORT_AXIS_HEADER); - descript_size += (sizeof(REPORT_AXIS_USAGE) * axis_count); - descript_size += sizeof(REPORT_AXIS_TAIL); report_size += (sizeof(WORD) * axis_count); }
@@ -424,77 +302,55 @@ static BOOL build_report_descriptor(struct platform_private *ext) FIXME("Capping ball + axis at 9\n"); ball_count = (9-axis_count)/2; } - descript_size += sizeof(REPORT_AXIS_HEADER); - descript_size += (sizeof(REPORT_AXIS_USAGE) * ball_count * 2); - descript_size += sizeof(REPORT_REL_AXIS_TAIL); report_size += (sizeof(WORD) * 2 * ball_count); }
/* For now lump all buttons just into incremental usages, Ignore Keys */ button_count = pSDL_JoystickNumButtons(ext->sdl_joystick); ext->button_start = report_size; - if (button_count) - { - descript_size += sizeof(REPORT_BUTTONS); - }
hat_count = pSDL_JoystickNumHats(ext->sdl_joystick); ext->hat_bit_offs = button_count; - if (hat_count) - { - descript_size += sizeof(REPORT_HATSWITCH); - }
report_size += (button_count + hat_count * 4 + 7) / 8;
- descript_size += test_haptic(ext); - - TRACE("Report Descriptor will be %i bytes\n", descript_size); TRACE("Report will be %i bytes\n", report_size);
- ext->report_descriptor = HeapAlloc(GetProcessHeap(), 0, descript_size); - if (!ext->report_descriptor) - { - ERR("Failed to alloc report descriptor\n"); + if (!hid_descriptor_begin(&ext->desc, device_usage[0], device_usage[1])) return FALSE; - } - report_ptr = ext->report_descriptor; - - memcpy(report_ptr, REPORT_HEADER, sizeof(REPORT_HEADER)); - report_ptr[IDX_HEADER_PAGE] = device_usage[0]; - report_ptr[IDX_HEADER_USAGE] = device_usage[1]; - report_ptr += sizeof(REPORT_HEADER); - if (axis_count) - { - if (axis_count == 6 && button_count >= 14) - report_ptr = add_axis_block(report_ptr, axis_count, HID_USAGE_PAGE_GENERIC, controller_usages, TRUE); - else - report_ptr = add_axis_block(report_ptr, axis_count, HID_USAGE_PAGE_GENERIC, joystick_usages, TRUE);
- } - if (ball_count) + if (axis_count == 6 && button_count >= 14) { - report_ptr = add_axis_block(report_ptr, ball_count * 2, HID_USAGE_PAGE_GENERIC, &joystick_usages[axis_count], FALSE); + if (!hid_descriptor_add_axes(&ext->desc, axis_count, HID_USAGE_PAGE_GENERIC, + controller_usages, FALSE, 16, 0, 0xffff)) + return FALSE; } - if (button_count) + else if (axis_count) { - report_ptr = add_button_block(report_ptr, 1, button_count); + if (!hid_descriptor_add_axes(&ext->desc, axis_count, HID_USAGE_PAGE_GENERIC, + joystick_usages, FALSE, 16, 0, 0xffff)) + return FALSE; } - if (hat_count) - report_ptr = add_hatswitch(report_ptr, hat_count);
- report_ptr += build_haptic(ext, report_ptr); - memcpy(report_ptr, REPORT_TAIL, sizeof(REPORT_TAIL)); + if (ball_count && !hid_descriptor_add_axes(&ext->desc, ball_count * 2, HID_USAGE_PAGE_GENERIC, + &joystick_usages[axis_count], TRUE, 8, 0x81, 0x7f)) + return FALSE;
- ext->report_descriptor_size = descript_size; - ext->buffer_length = report_size; - ext->report_buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, report_size); - if (ext->report_buffer == NULL) - { - ERR("Failed to alloc report buffer\n"); - HeapFree(GetProcessHeap(), 0, ext->report_descriptor); + if (button_count && !hid_descriptor_add_buttons(&ext->desc, HID_USAGE_PAGE_BUTTON, 1, button_count)) + return FALSE; + + if (hat_count && !hid_descriptor_add_hatswitch(&ext->desc, hat_count)) return FALSE; - } + + if (!descriptor_add_haptic(ext)) + return FALSE; + + if (!hid_descriptor_end(&ext->desc)) + return FALSE; + + ext->buffer_length = report_size; + if (!(ext->report_buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, report_size))) + goto failed;
/* Initialize axis in the report */ for (i = 0; i < axis_count; i++) @@ -503,6 +359,11 @@ static BOOL build_report_descriptor(struct platform_private *ext) set_hat_value(ext, i, pSDL_JoystickGetHat(ext->sdl_joystick, i));
return TRUE; + +failed: + HeapFree(GetProcessHeap(), 0, ext->report_buffer); + hid_descriptor_free(&ext->desc); + return FALSE; }
static SHORT compose_dpad_value(SDL_GameController *joystick) @@ -534,21 +395,13 @@ static SHORT compose_dpad_value(SDL_GameController *joystick)
static BOOL build_mapped_report_descriptor(struct platform_private *ext) { - BYTE *report_ptr; - INT i, descript_size; + static const USAGE left_axis_usages[] = {HID_USAGE_GENERIC_X, HID_USAGE_GENERIC_Y}; + static const USAGE right_axis_usages[] = {HID_USAGE_GENERIC_RX, HID_USAGE_GENERIC_RY}; + static const USAGE trigger_axis_usages[] = {HID_USAGE_GENERIC_Z, HID_USAGE_GENERIC_RZ}; + INT i;
static const int BUTTON_BIT_COUNT = CONTROLLER_NUM_BUTTONS + CONTROLLER_NUM_HATSWITCHES * 4;
- descript_size = sizeof(REPORT_HEADER) + sizeof(REPORT_TAIL); - descript_size += sizeof(CONTROLLER_AXIS); - descript_size += sizeof(CONTROLLER_TRIGGERS); - descript_size += sizeof(CONTROLLER_BUTTONS); - descript_size += sizeof(REPORT_HATSWITCH); - descript_size += sizeof(REPORT_PADDING); - if (BUTTON_BIT_COUNT % 8 != 0) - descript_size += sizeof(REPORT_PADDING); - descript_size += test_haptic(ext); - ext->axis_start = 0; ext->button_start = CONTROLLER_NUM_AXES * sizeof(WORD); ext->hat_bit_offs = CONTROLLER_NUM_BUTTONS; @@ -557,43 +410,49 @@ static BOOL build_mapped_report_descriptor(struct platform_private *ext) + CONTROLLER_NUM_AXES * sizeof(WORD) + 2/* unknown constant*/;
- TRACE("Report Descriptor will be %i bytes\n", descript_size); TRACE("Report will be %i bytes\n", ext->buffer_length);
- ext->report_descriptor = HeapAlloc(GetProcessHeap(), 0, descript_size); - if (!ext->report_descriptor) - { - ERR("Failed to alloc report descriptor\n"); + if (!hid_descriptor_begin(&ext->desc, HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_GAMEPAD)) return FALSE; - } - report_ptr = ext->report_descriptor; - - memcpy(report_ptr, REPORT_HEADER, sizeof(REPORT_HEADER)); - report_ptr[IDX_HEADER_PAGE] = HID_USAGE_PAGE_GENERIC; - report_ptr[IDX_HEADER_USAGE] = HID_USAGE_GENERIC_GAMEPAD; - report_ptr += sizeof(REPORT_HEADER); - memcpy(report_ptr, CONTROLLER_AXIS, sizeof(CONTROLLER_AXIS)); - report_ptr += sizeof(CONTROLLER_AXIS); - memcpy(report_ptr, CONTROLLER_TRIGGERS, sizeof(CONTROLLER_TRIGGERS)); - report_ptr += sizeof(CONTROLLER_TRIGGERS); - memcpy(report_ptr, CONTROLLER_BUTTONS, sizeof(CONTROLLER_BUTTONS)); - report_ptr += sizeof(CONTROLLER_BUTTONS); - report_ptr = add_hatswitch(report_ptr, 1); + + if (!hid_descriptor_add_axes(&ext->desc, 2, HID_USAGE_PAGE_GENERIC, left_axis_usages, + FALSE, 16, 0, 0xffff)) + return FALSE; + + if (!hid_descriptor_add_axes(&ext->desc, 2, HID_USAGE_PAGE_GENERIC, right_axis_usages, + FALSE, 16, 0, 0xffff)) + return FALSE; + + if (!hid_descriptor_add_axes(&ext->desc, 2, HID_USAGE_PAGE_GENERIC, trigger_axis_usages, + FALSE, 16, 0, 0x7fff)) + return FALSE; + + if (!hid_descriptor_add_buttons(&ext->desc, HID_USAGE_PAGE_BUTTON, 1, CONTROLLER_NUM_BUTTONS)) + return FALSE; + + if (!hid_descriptor_add_hatswitch(&ext->desc, 1)) + return FALSE; + if (BUTTON_BIT_COUNT % 8 != 0) - report_ptr = add_padding_block(report_ptr, 8 - (BUTTON_BIT_COUNT % 8));/* unused bits between hatswitch and following constant */ - report_ptr = add_padding_block(report_ptr, 16);/* unknown constant */ - report_ptr += build_haptic(ext, report_ptr); - memcpy(report_ptr, REPORT_TAIL, sizeof(REPORT_TAIL)); - - ext->report_descriptor_size = descript_size; - ext->report_buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ext->buffer_length); - if (ext->report_buffer == NULL) { - ERR("Failed to alloc report buffer\n"); - HeapFree(GetProcessHeap(), 0, ext->report_descriptor); - return FALSE; + /* unused bits between hatswitch and following constant */ + if (!hid_descriptor_add_padding(&ext->desc, 8 - (BUTTON_BIT_COUNT % 8))) + return FALSE; }
+ /* unknown constant */ + if (!hid_descriptor_add_padding(&ext->desc, 16)) + return FALSE; + + if (!descriptor_add_haptic(ext)) + return FALSE; + + if (!hid_descriptor_end(&ext->desc)) + return FALSE; + + if (!(ext->report_buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ext->buffer_length))) + goto failed; + /* Initialize axis in the report */ for (i = SDL_CONTROLLER_AXIS_LEFTX; i < SDL_CONTROLLER_AXIS_MAX; i++) set_axis_value(ext, i, pSDL_GameControllerGetAxis(ext->sdl_controller, i), TRUE); @@ -605,6 +464,11 @@ static BOOL build_mapped_report_descriptor(struct platform_private *ext) ext->report_buffer[15] = 0xc5;
return TRUE; + +failed: + HeapFree(GetProcessHeap(), 0, ext->report_buffer); + hid_descriptor_free(&ext->desc); + return FALSE; }
static void free_device(DEVICE_OBJECT *device) @@ -629,13 +493,10 @@ static NTSTATUS get_reportdescriptor(DEVICE_OBJECT *device, BYTE *buffer, DWORD { struct platform_private *ext = impl_from_DEVICE_OBJECT(device);
- *out_length = ext->report_descriptor_size; - - if (length < ext->report_descriptor_size) - return STATUS_BUFFER_TOO_SMALL; - - memcpy(buffer, ext->report_descriptor, ext->report_descriptor_size); + *out_length = ext->desc.size; + if (length < ext->desc.size) return STATUS_BUFFER_TOO_SMALL;
+ memcpy(buffer, ext->desc.data, ext->desc.size); return STATUS_SUCCESS; }
diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index f9469399202..c411e9e3929 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -78,7 +78,6 @@ #define LE_DWORD(x) (x) #endif
-#include "controller.h" #include "bus.h"
WINE_DEFAULT_DEBUG_CHANNEL(plugplay); diff --git a/dlls/winebus.sys/controller.h b/dlls/winebus.sys/controller.h deleted file mode 100644 index b03338841e8..00000000000 --- a/dlls/winebus.sys/controller.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Common controller functions and structures - * - * Copyright 2018 Aric Stewart - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include <stdarg.h> - -#include <windef.h> -#include <winbase.h> -#include <hidusage.h> - -struct hid_descriptor -{ - BYTE *data; - SIZE_T size; - SIZE_T max_size; -}; - -extern BOOL hid_descriptor_append(struct hid_descriptor *desc, const BYTE *buffer, SIZE_T size) DECLSPEC_HIDDEN; -extern BOOL hid_descriptor_begin(struct hid_descriptor *desc, USAGE usage_page, USAGE usage) DECLSPEC_HIDDEN; -extern BOOL hid_descriptor_end(struct hid_descriptor *desc) DECLSPEC_HIDDEN; -extern void hid_descriptor_free(struct hid_descriptor *desc) DECLSPEC_HIDDEN; - -extern BOOL hid_descriptor_add_buttons(struct hid_descriptor *desc, USAGE usage_page, - USAGE usage_min, USAGE usage_max) DECLSPEC_HIDDEN; -extern BOOL hid_descriptor_add_padding(struct hid_descriptor *desc, BYTE bitcount) DECLSPEC_HIDDEN; -extern BOOL hid_descriptor_add_hatswitch(struct hid_descriptor *desc, INT count) DECLSPEC_HIDDEN; -extern BOOL hid_descriptor_add_axes(struct hid_descriptor *desc, BYTE count, USAGE usage_page, - const USAGE *usages, BOOL rel, INT size, LONG min, LONG max) DECLSPEC_HIDDEN; - -/* Blocks of data for building HID device descriptions */ - -#include "psh_hid_macros.h" - -static const BYTE REPORT_HEADER[] = { - USAGE_PAGE(1, /* placeholder */ HID_USAGE_PAGE_GENERIC), - USAGE(1, 0), - COLLECTION(1, Application), - USAGE(1, /* placeholder */ HID_USAGE_GENERIC_POINTER), - COLLECTION(1, Physical), -}; -#define IDX_HEADER_PAGE 1 -#define IDX_HEADER_USAGE 3 - -static const BYTE REPORT_BUTTONS[] = { - USAGE_PAGE(1, /* placeholder */ HID_USAGE_PAGE_BUTTON), - USAGE_MINIMUM(1, /* placeholder */ 1), - USAGE_MAXIMUM(1, /* placeholder */ 3), - LOGICAL_MINIMUM(1, 0), - LOGICAL_MAXIMUM(1, 1), - PHYSICAL_MINIMUM(1, 0), - PHYSICAL_MAXIMUM(1, 1), - REPORT_COUNT(1, /* placeholder */ 3), - REPORT_SIZE(1, 1), - INPUT(1, Data|Var|Abs), -}; -#define IDX_BUTTON_USAGE_PAGE 1 -#define IDX_BUTTON_MIN_USAGE 3 -#define IDX_BUTTON_MAX_USAGE 5 -#define IDX_BUTTON_COUNT 15 - -static const BYTE REPORT_PADDING[] = { - REPORT_COUNT(1, /* placeholder */ 3), - REPORT_SIZE(1, 1), - INPUT(1, Cnst|Var|Abs), -}; -#define IDX_PADDING_BIT_COUNT 1 - -static const BYTE REPORT_AXIS_HEADER[] = { - USAGE_PAGE(1, /* placeholder */ HID_USAGE_PAGE_GENERIC), -}; -#define IDX_AXIS_PAGE 1 - -static const BYTE REPORT_AXIS_USAGE[] = { - USAGE(1, /* placeholder */ HID_USAGE_GENERIC_X), -}; -#define IDX_AXIS_USAGE 1 - -static const BYTE REPORT_REL_AXIS_TAIL[] = { - LOGICAL_MINIMUM(1, 0x81), - LOGICAL_MAXIMUM(1, 0x7f), - REPORT_SIZE(1, 8), - REPORT_COUNT(1, /* placeholder */ 2), - INPUT(1, Data|Var|Rel), -}; -#define IDX_REL_AXIS_COUNT 7 - -static const BYTE REPORT_HATSWITCH[] = { - USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), - USAGE(1, HID_USAGE_GENERIC_HATSWITCH), - LOGICAL_MINIMUM(1, 1), - LOGICAL_MAXIMUM(1, 8), - PHYSICAL_MINIMUM(1, 0), - PHYSICAL_MAXIMUM(1, 8), - REPORT_SIZE(1, 4), - REPORT_COUNT(1, /* placeholder */ 1), - INPUT(1, Data|Var|Abs), -}; -#define IDX_HATSWITCH_COUNT 15 - -static const BYTE REPORT_TAIL[] = { - END_COLLECTION, - END_COLLECTION, -}; - -#include "pop_hid_macros.h" - -static inline BYTE *add_button_block(BYTE* report_ptr, BYTE usage_min, BYTE usage_max) -{ - memcpy(report_ptr, REPORT_BUTTONS, sizeof(REPORT_BUTTONS)); - report_ptr[IDX_BUTTON_MIN_USAGE] = usage_min; - report_ptr[IDX_BUTTON_MAX_USAGE] = usage_max; - report_ptr[IDX_BUTTON_COUNT] = (usage_max - usage_min) + 1; - return report_ptr + sizeof(REPORT_BUTTONS); -} - - -static inline BYTE *add_padding_block(BYTE *report_ptr, BYTE bitcount) -{ - memcpy(report_ptr, REPORT_PADDING, sizeof(REPORT_PADDING)); - report_ptr[IDX_PADDING_BIT_COUNT] = bitcount; - return report_ptr + sizeof(REPORT_PADDING); -} - -static inline BYTE *add_hatswitch(BYTE *report_ptr, INT count) -{ - memcpy(report_ptr, REPORT_HATSWITCH, sizeof(REPORT_HATSWITCH)); - report_ptr[IDX_HATSWITCH_COUNT] = count; - return report_ptr + sizeof(REPORT_HATSWITCH); -} diff --git a/dlls/winebus.sys/hid.c b/dlls/winebus.sys/hid.c index 86c27d3eded..1a245031d4d 100644 --- a/dlls/winebus.sys/hid.c +++ b/dlls/winebus.sys/hid.c @@ -18,7 +18,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "controller.h" +#include <stdarg.h> + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "winternl.h" +#include "winioctl.h" +#include "hidusage.h" +#include "ddk/wdm.h" + +#include "bus.h"
BOOL hid_descriptor_append(struct hid_descriptor *desc, const BYTE *buffer, SIZE_T size) { @@ -209,4 +218,31 @@ BOOL hid_descriptor_add_axes(struct hid_descriptor *desc, BYTE count, USAGE usag return TRUE; }
+BOOL hid_descriptor_add_haptics(struct hid_descriptor *desc) +{ + static const BYTE template[] = + { + USAGE_PAGE(2, HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN), + USAGE(1, 0x01), + /* padding */ + REPORT_COUNT(1, 0x02), + REPORT_SIZE(1, 0x08), + OUTPUT(1, Data|Var|Abs), + /* actuators */ + LOGICAL_MINIMUM(1, 0x00), + LOGICAL_MAXIMUM(1, 0xff), + PHYSICAL_MINIMUM(1, 0x00), + PHYSICAL_MAXIMUM(1, 0xff), + REPORT_SIZE(1, 0x08), + REPORT_COUNT(1, 0x02), + OUTPUT(1, Data|Var|Abs), + /* padding */ + REPORT_COUNT(1, 0x02), + REPORT_SIZE(1, 0x08), + OUTPUT(1, Data|Var|Abs), + }; + + return hid_descriptor_append(desc, template, sizeof(template)); +} + #include "pop_hid_macros.h" diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index 84885bdcce9..001f775e230 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -34,7 +34,6 @@ #include "wine/list.h"
#include "bus.h" -#include "controller.h"
WINE_DEFAULT_DEBUG_CHANNEL(plugplay); WINE_DECLARE_DEBUG_CHANNEL(hid_report); diff --git a/dlls/xinput1_3/tests/xinput.c b/dlls/xinput1_3/tests/xinput.c index 0c94bfed982..272a41c690c 100644 --- a/dlls/xinput1_3/tests/xinput.c +++ b/dlls/xinput1_3/tests/xinput.c @@ -460,7 +460,6 @@ static void check_hid_caps(DWORD index, HANDLE device, PHIDP_PREPARSED_DATA pre todo_wine_if(xi_caps.Flags & XINPUT_CAPS_FFB_SUPPORTED) check_member(*hid_caps, expect_hid_caps, "%d", OutputReportByteLength); check_member(*hid_caps, expect_hid_caps, "%d", FeatureReportByteLength); - todo_wine check_member(*hid_caps, expect_hid_caps, "%d", NumberLinkCollectionNodes); check_member(*hid_caps, expect_hid_caps, "%d", NumberInputButtonCaps); todo_wine @@ -479,20 +478,16 @@ static void check_hid_caps(DWORD index, HANDLE device, PHIDP_PREPARSED_DATA pre length = hid_caps->NumberLinkCollectionNodes; status = HidP_GetLinkCollectionNodes(collections, &length, preparsed); ok(status == HIDP_STATUS_SUCCESS, "HidP_GetLinkCollectionNodes returned %#x\n", status); - todo_wine ok(length == ARRAY_SIZE(expect_collections), "got %d collections\n", length);
for (i = 0; i < min(length, ARRAY_SIZE(expect_collections)); ++i) { winetest_push_context("collections[%d]", i); - todo_wine_if(i == 1) check_member(collections[i], expect_collections[i], "%04x", LinkUsage); check_member(collections[i], expect_collections[i], "%04x", LinkUsagePage); check_member(collections[i], expect_collections[i], "%d", Parent); - todo_wine_if(i == 0) check_member(collections[i], expect_collections[i], "%d", NumberOfChildren); check_member(collections[i], expect_collections[i], "%d", NextSibling); - todo_wine_if(i == 0) check_member(collections[i], expect_collections[i], "%d", FirstChild); check_member(collections[i], expect_collections[i], "%d", CollectionType); check_member(collections[i], expect_collections[i], "%d", IsAlias); @@ -511,9 +506,7 @@ static void check_hid_caps(DWORD index, HANDLE device, PHIDP_PREPARSED_DATA pre check_member(button_caps[i], expect_button_caps[i], "%d", ReportID); check_member(button_caps[i], expect_button_caps[i], "%d", IsAlias); check_member(button_caps[i], expect_button_caps[i], "%d", BitField); - todo_wine check_member(button_caps[i], expect_button_caps[i], "%d", LinkCollection); - todo_wine check_member(button_caps[i], expect_button_caps[i], "%04x", LinkUsage); check_member(button_caps[i], expect_button_caps[i], "%04x", LinkUsagePage); check_member(button_caps[i], expect_button_caps[i], "%d", IsRange); @@ -569,9 +562,9 @@ static void check_hid_caps(DWORD index, HANDLE device, PHIDP_PREPARSED_DATA pre check_member(value_caps[i], expect_value_caps[i], "%d", IsAlias); todo_wine_if(i == 5) check_member(value_caps[i], expect_value_caps[i], "%d", BitField); - todo_wine_if(i >= 2) + todo_wine_if(i == 5) check_member(value_caps[i], expect_value_caps[i], "%d", LinkCollection); - todo_wine + todo_wine_if(i == 5) check_member(value_caps[i], expect_value_caps[i], "%d", LinkUsage); check_member(value_caps[i], expect_value_caps[i], "%d", LinkUsagePage); check_member(value_caps[i], expect_value_caps[i], "%d", IsRange); @@ -597,7 +590,7 @@ static void check_hid_caps(DWORD index, HANDLE device, PHIDP_PREPARSED_DATA pre
if (!value_caps[i].IsRange && !expect_value_caps[i].IsRange) { - todo_wine + todo_wine_if(i >= 4) check_member(value_caps[i], expect_value_caps[i], "%04x", NotRange.Usage); todo_wine_if(i == 5) check_member(value_caps[i], expect_value_caps[i], "%d", NotRange.DataIndex);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=95511
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:2933: Test failed: failed to register device, error 0xe000020b ntoskrnl.c:2766: Test failed: id 0 poll: didn't find device ntoskrnl.c:2770: Test failed: id 0 poll: got error 5 ntoskrnl.c:2775: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2776: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2781: Test failed: id 0 poll: HidD_SetNumInputBuffers returned error 6 ntoskrnl.c:2785: Test failed: id 0 poll: HidD_SetNumInputBuffers returned error 6 ntoskrnl.c:2789: Test failed: id 0 poll: HidD_SetNumInputBuffers failed last error 6 ntoskrnl.c:2794: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2795: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2800: Test failed: id 0 poll: got error 5 ntoskrnl.c:2805: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2806: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2810: Test failed: id 0 poll: HidD_SetNumInputBuffers failed last error 6 ntoskrnl.c:2815: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2816: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2820: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2821: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2828: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2830: Test failed: id 0 poll: got poll_freq 6239376, expected 5 ntoskrnl.c:2836: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2842: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2849: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:1890: Test failed: id 0 poll: HidD_GetPreparsedData failed with error 6 ntoskrnl.c:1896: Test failed: id 0 poll: HidP_GetCaps returned 0xc0110001 ntoskrnl.c:1897: Test failed: id 0 poll: got InputReportByteLength 23, expected 24 ntoskrnl.c:1897: Test failed: id 0 poll: got OutputReportByteLength 2, expected 3 ntoskrnl.c:1897: Test failed: id 0 poll: got FeatureReportByteLength 17, expected 18 ntoskrnl.c:1901: Test failed: id 0 poll: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1902: Test failed: id 0 poll: got 0 collection nodes, expected 10 ntoskrnl.c:1908: Test failed: id 0 poll: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1909: Test failed: id 0 poll: got 16 collection nodes, expected 10 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got LinkUsage 0074, expected 0004 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got LinkUsagePage 0076, expected 0001 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got Parent 56000, expected 0 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got NumberOfChildren 65, expected 7 ntoskrnl.c:1921: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1923: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1926: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1927: Test failed: id 0 poll: HidP_GetButtonCaps returned count 0, expected 13 ntoskrnl.c:1934: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1935: Test failed: id 0 poll: HidP_GetButtonCaps returned count 16, expected 13 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got UsagePage 0000, expected 0009 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got BitField 0, expected 2 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got IsRange 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got IsAbsolute 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got UsagePage 0000, expected 0009 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got BitField 0, expected 3 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got IsRange 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got IsAbsolute 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got UsagePage 0000, expected 0007 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got BitField 0, expected 508 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got IsRange 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got UsagePage 0000, expected 0009 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got BitField 0, expected 2 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got IsAbsolute 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got NotRange.Usage 0000, expected 0020 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got NotRange.DataIndex 0, expected 26 ntoskrnl.c:1947: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1949: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1952: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1953: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 0, expected 13 ntoskrnl.c:1960: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1961: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 15, expected 13 ntoskrnl.c:1967: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1968: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 15, expected 1 ntoskrnl.c:1973: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1974: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1977: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1978: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1981: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1982: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1986: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1988: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1991: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1992: Test failed: id 0 poll: HidP_GetValueCaps returned count 0, expected 7 ntoskrnl.c:1998: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1999: Test failed: id 0 poll: HidP_GetValueCaps returned count 16, expected 7 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got UsagePage 3a43, expected 0001 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got ReportID 92, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsAlias 87, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got BitField 28265, expected 2 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got LinkCollection 28516, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got LinkUsage 29559, expected 4 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got LinkUsagePage 18780, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsRange 78, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsStringRange 70, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsDesignatorRange 92, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsAbsolute 111, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got HasNull 101, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got BitSize 11830, expected 8 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got ReportCount 28265, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[1]: got ReportID 1, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[2]: got ReportID 1, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[3]: got ReportID 1, expected 0 ntoskrnl.c:2011: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2013: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2016: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2017: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 0, expected 7 ntoskrnl.c:2024: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2025: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 12, expected 7 ntoskrnl.c:2027: Test failed: id 0 poll: got UsagePage 0001, expected 3a43 ntoskrnl.c:2027: Test failed: id 0 poll: got ReportID 1, expected 92 ntoskrnl.c:2027: Test failed: id 0 poll: got IsAlias 0, expected 87 ntoskrnl.c:2027: Test failed: id 0 poll: got BitField 2, expected 28265 ntoskrnl.c:2027: Test failed: id 0 poll: got LinkCollection 1, expected 28516 ntoskrnl.c:2027: Test failed: id 0 poll: got LinkUsage 4, expected 29559 ntoskrnl.c:2027: Test failed: id 0 poll: got LinkUsagePage 1, expected 18780 ntoskrnl.c:2027: Test failed: id 0 poll: got IsRange 0, expected 78 ntoskrnl.c:2027: Test failed: id 0 poll: got IsStringRange 0, expected 70 ntoskrnl.c:2027: Test failed: id 0 poll: got IsDesignatorRange 0, expected 92 ntoskrnl.c:2027: Test failed: id 0 poll: got IsAbsolute 1, expected 111 ntoskrnl.c:2027: Test failed: id 0 poll: got HasNull 0, expected 101 ntoskrnl.c:2027: Test failed: id 0 poll: got BitSize 4, expected 11830 ntoskrnl.c:2027: Test failed: id 0 poll: got ReportCount 2, expected 28265 ntoskrnl.c:2027: Test failed: id 0 poll: got LogicalMin 1, expected -128 ntoskrnl.c:2027: Test failed: id 0 poll: got LogicalMax 8, expected 127 ntoskrnl.c:2035: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2041: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2042: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2045: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2046: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2049: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2050: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2055: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2057: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2059: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2061: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2065: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2070: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2074: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2078: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2082: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2086: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2090: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2094: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2099: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2103: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2104: Test failed: id 0 poll: got value deadbeef, expected 0x80 ntoskrnl.c:2108: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2109: Test failed: id 0 poll: got value deadbeef, expected 0xffffff80 ntoskrnl.c:2114: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2118: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2119: Test failed: id 0 poll: got value deadbeef, expected 0x7f ntoskrnl.c:2124: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2128: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2129: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2134: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2138: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2139: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2143: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2144: Test failed: id 0 poll: got value deadbeef, expected 0x7fffffff ntoskrnl.c:2149: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2153: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2154: Test failed: id 0 poll: got value deadbeef, expected 0x7fffffff ntoskrnl.c:2159: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2163: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2164: Test failed: id 0 poll: got value deadbeef, expected 0x80000000 ntoskrnl.c:2169: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2173: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2174: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2179: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2183: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2184: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2189: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Input, 0) returned 0, expected 42 ntoskrnl.c:2191: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_BUTTON) returned 0, expected 32 ntoskrnl.c:2193: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_LED) returned 0, expected 8 ntoskrnl.c:2195: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Feature, HID_USAGE_PAGE_BUTTON) returned 0, expected 8 ntoskrnl.c:2203: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2209: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2215: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2221: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2226: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2227: Test failed: id 0 poll: got usage count 16, expected 2 ntoskrnl.c:2233: Test failed: id 0 poll: got report[6] ffffffcd expected 0 ntoskrnl.c:2234: Test failed: id 0 poll: got report[7] ffffffcd expected 0 ntoskrnl.c:2238: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2241: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2245: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2250: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2256: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2257: Test failed: id 0 poll: got usage count 1, expected 2 ntoskrnl.c:2262: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2263: Test failed: id 0 poll: got usage count 16, expected 2 ntoskrnl.c:2264: Test failed: id 0 poll: got usages[0] cdcd, expected 4 ntoskrnl.c:2265: Test failed: id 0 poll: got usages[1] cdcd, expected 6 ntoskrnl.c:2271: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2272: Test failed: id 0 poll: got usage count 16, expected 2 ntoskrnl.c:2273: Test failed: id 0 poll: got usages[0] cdcd, expected 6 ntoskrnl.c:2274: Test failed: id 0 poll: got usages[1] cdcd, expected 4 ntoskrnl.c:2280: Test failed: id 0 poll: HidP_GetUsagesEx returned 0xc0110001 ntoskrnl.c:2281: Test failed: id 0 poll: got usage count 16, expected 4 ntoskrnl.c:2282: Test failed: id 0 poll: got usage_and_pages[0] UsagePage cdcd, expected 9 ntoskrnl.c:2284: Test failed: id 0 poll: got usage_and_pages[1] UsagePage cdcd, expected 9 ntoskrnl.c:2286: Test failed: id 0 poll: got usage_and_pages[2] UsagePage cdcd, expected 7 ntoskrnl.c:2288: Test failed: id 0 poll: got usage_and_pages[3] UsagePage cdcd, expected 7 ntoskrnl.c:2290: Test failed: id 0 poll: got usage_and_pages[4] UsagePage cdcd, expected 8 ntoskrnl.c:2292: Test failed: id 0 poll: got usage_and_pages[5] UsagePage cdcd, expected 8 ntoskrnl.c:2294: Test failed: id 0 poll: got usage_and_pages[0] Usage cdcd, expected 4 ntoskrnl.c:2296: Test failed: id 0 poll: got usage_and_pages[1] Usage cdcd, expected 6 ntoskrnl.c:2298: Test failed: id 0 poll: got usage_and_pages[2] Usage cdcd, expected 9 ntoskrnl.c:2300: Test failed: id 0 poll: got usage_and_pages[3] Usage cdcd, expected b ntoskrnl.c:2302: Test failed: id 0 poll: got usage_and_pages[4] Usage cdcd, expected 6 ntoskrnl.c:2304: Test failed: id 0 poll: got usage_and_pages[5] Usage cdcd, expected 4 ntoskrnl.c:2310: Test failed: id 0 poll: HidP_MaxDataListLength(HidP_Input) returned 0, expected 50 ntoskrnl.c:2314: Test failed: id 0 poll: HidP_MaxDataListLength(HidP_Feature) returned 0, expected 13 ntoskrnl.c:2318: Test failed: id 0 poll: HidP_GetData returned 0xc0110001 ntoskrnl.c:2319: Test failed: id 0 poll: got data count 1, expected 11 ntoskrnl.c:2322: Test failed: id 0 poll: HidP_GetData returned 0xc0110001 ntoskrnl.c:2326: Test failed: id 0 poll: data[1]: got DataIndex 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[2]: got DataIndex 0, expected 5 ntoskrnl.c:2327: Test failed: id 0 poll: data[2]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[3]: got DataIndex 0, expected 7 ntoskrnl.c:2327: Test failed: id 0 poll: data[3]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[4]: got DataIndex 0, expected 19 ntoskrnl.c:2327: Test failed: id 0 poll: data[4]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[5]: got DataIndex 0, expected 21 ntoskrnl.c:2327: Test failed: id 0 poll: data[5]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[6]: got DataIndex 0, expected 30 ntoskrnl.c:2326: Test failed: id 0 poll: data[7]: got DataIndex 0, expected 31 ntoskrnl.c:2326: Test failed: id 0 poll: data[8]: got DataIndex 0, expected 32 ntoskrnl.c:2327: Test failed: id 0 poll: data[8]: got RawValue 0, expected -17970434 ntoskrnl.c:2326: Test failed: id 0 poll: data[9]: got DataIndex 0, expected 37 ntoskrnl.c:2327: Test failed: id 0 poll: data[9]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[10]: got DataIndex 0, expected 39 ntoskrnl.c:2327: Test failed: id 0 poll: data[10]: got RawValue 0, expected 1 ntoskrnl.c:2333: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2337: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2342: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2360: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2364: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2369: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2375: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2379: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2384: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2391: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2398: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2401: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2405: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2410: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2414: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2419: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2420: Test failed: id 0 poll: got value deadbeef, expected 0x1005 ntoskrnl.c:2426: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2429: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2430: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2435: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2438: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2440: Test failed: id 0 poll: unexpected report value ntoskrnl.c:2445: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2450: Test failed: id 0 poll: HidD_GetInputReport returned error 6 ntoskrnl.c:2455: Test failed: id 0 poll: HidD_GetInputReport returned error 6 ntoskrnl.c:2464: Test failed: id 0 poll: HidD_GetInputReport returned error 6 ntoskrnl.c:2475: Test failed: id 0 poll: HidD_GetInputReport failed, last error 6 ntoskrnl.c:2476: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2481: Test failed: id 0 poll: IOCTL_HID_GET_INPUT_REPORT failed, last error 6 ntoskrnl.c:2482: Test failed: id 0 poll: got length 46, expected 3 ntoskrnl.c:2483: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2488: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2493: Test failed: id 0 poll: HidD_GetFeature returned error 6 ntoskrnl.c:2498: Test failed: id 0 poll: HidD_GetFeature returned error 6 ntoskrnl.c:2507: Test failed: id 0 poll: HidD_GetFeature returned error 6 ntoskrnl.c:2518: Test failed: id 0 poll: HidD_GetFeature failed, last error 6 ntoskrnl.c:2519: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2524: Test failed: id 0 poll: IOCTL_HID_GET_FEATURE failed, last error 6 ntoskrnl.c:2525: Test failed: id 0 poll: got length 34, expected 3 ntoskrnl.c:2526: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2531: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2536: Test failed: id 0 poll: HidD_SetFeature returned error 6 ntoskrnl.c:2541: Test failed: id 0 poll: HidD_SetFeature returned error 6 ntoskrnl.c:2550: Test failed: id 0 poll: HidD_SetFeature returned error 6 ntoskrnl.c:2560: Test failed: id 0 poll: HidD_SetFeature failed, last error 6 ntoskrnl.c:2566: Test failed: id 0 poll: IOCTL_HID_SET_FEATURE returned error 6 ntoskrnl.c:2570: Test failed: id 0 poll: IOCTL_HID_SET_FEATURE failed, last error 6 ntoskrnl.c:2571: Test failed: id 0 poll: got length 0, expected 3 ntoskrnl.c:2576: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2583: Test failed: id 0 poll: HidD_SetOutputReport returned error 6 ntoskrnl.c:2588: Test failed: id 0 poll: HidD_SetOutputReport returned error 6 ntoskrnl.c:2597: Test failed: id 0 poll: HidD_SetOutputReport returned error 6 ntoskrnl.c:2607: Test failed: id 0 poll: HidD_SetOutputReport failed, last error 6 ntoskrnl.c:2613: Test failed: id 0 poll: IOCTL_HID_SET_OUTPUT_REPORT returned error 6 ntoskrnl.c:2617: Test failed: id 0 poll: IOCTL_HID_SET_OUTPUT_REPORT failed, last error 6 ntoskrnl.c:2618: Test failed: id 0 poll: got length 0, expected 3 ntoskrnl.c:2624: Test failed: id 0 poll: WriteFile returned error 6 ntoskrnl.c:2629: Test failed: id 0 poll: WriteFile returned error 6 ntoskrnl.c:2640: Test failed: id 0 poll: WriteFile returned error 6 ntoskrnl.c:2654: Test failed: id 0 poll: WriteFile failed, last error 6 ntoskrnl.c:2655: Test failed: id 0 poll: WriteFile wrote 0 ntoskrnl.c:2662: Test failed: id 0 poll: ReadFile failed, last error 6 ntoskrnl.c:2666: Test failed: id 0 poll: ReadFile failed, last error 6 ntoskrnl.c:2674: Test failed: id 0 poll: ReadFile failed, last error 6 ntoskrnl.c:2675: Test failed: id 0 poll: ReadFile returned 0 ntoskrnl.c:2676: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2685: Test failed: id 0 poll: ReadFile returned error 6 ntoskrnl: Timeout
On 8/12/21 10:58 AM, Marvin wrote:
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=95511
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:2933: Test failed: failed to register device, error 0xe000020b ntoskrnl.c:2766: Test failed: id 0 poll: didn't find device ntoskrnl.c:2770: Test failed: id 0 poll: got error 5 ntoskrnl.c:2775: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2776: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2781: Test failed: id 0 poll: HidD_SetNumInputBuffers returned error 6 ntoskrnl.c:2785: Test failed: id 0 poll: HidD_SetNumInputBuffers returned error 6 ntoskrnl.c:2789: Test failed: id 0 poll: HidD_SetNumInputBuffers failed last error 6 ntoskrnl.c:2794: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2795: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2800: Test failed: id 0 poll: got error 5 ntoskrnl.c:2805: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2806: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2810: Test failed: id 0 poll: HidD_SetNumInputBuffers failed last error 6 ntoskrnl.c:2815: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2816: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2820: Test failed: id 0 poll: HidD_GetNumInputBuffers failed last error 6 ntoskrnl.c:2821: Test failed: id 0 poll: HidD_GetNumInputBuffers returned 3735928559 ntoskrnl.c:2828: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2830: Test failed: id 0 poll: got poll_freq 6239376, expected 5 ntoskrnl.c:2836: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2842: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:2849: Test failed: id 0 poll: IOCTL_HID_GET_POLL_FREQUENCY_MSEC failed last error 6 ntoskrnl.c:1890: Test failed: id 0 poll: HidD_GetPreparsedData failed with error 6 ntoskrnl.c:1896: Test failed: id 0 poll: HidP_GetCaps returned 0xc0110001 ntoskrnl.c:1897: Test failed: id 0 poll: got InputReportByteLength 23, expected 24 ntoskrnl.c:1897: Test failed: id 0 poll: got OutputReportByteLength 2, expected 3 ntoskrnl.c:1897: Test failed: id 0 poll: got FeatureReportByteLength 17, expected 18 ntoskrnl.c:1901: Test failed: id 0 poll: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1902: Test failed: id 0 poll: got 0 collection nodes, expected 10 ntoskrnl.c:1908: Test failed: id 0 poll: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1909: Test failed: id 0 poll: got 16 collection nodes, expected 10 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got LinkUsage 0074, expected 0004 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got LinkUsagePage 0076, expected 0001 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got Parent 56000, expected 0 ntoskrnl.c:1915: Test failed: id 0 poll: collections[0]: got NumberOfChildren 65, expected 7 ntoskrnl.c:1921: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1923: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1926: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1927: Test failed: id 0 poll: HidP_GetButtonCaps returned count 0, expected 13 ntoskrnl.c:1934: Test failed: id 0 poll: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1935: Test failed: id 0 poll: HidP_GetButtonCaps returned count 16, expected 13 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got UsagePage 0000, expected 0009 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got BitField 0, expected 2 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got IsRange 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[0]: got IsAbsolute 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got UsagePage 0000, expected 0009 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got BitField 0, expected 3 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got IsRange 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[1]: got IsAbsolute 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got UsagePage 0000, expected 0007 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got BitField 0, expected 508 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[2]: got IsRange 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got UsagePage 0000, expected 0009 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got BitField 0, expected 2 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got LinkCollection 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got IsAbsolute 0, expected 1 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got NotRange.Usage 0000, expected 0020 ntoskrnl.c:1941: Test failed: id 0 poll: button_caps[3]: got NotRange.DataIndex 0, expected 26 ntoskrnl.c:1947: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1949: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1952: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1953: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 0, expected 13 ntoskrnl.c:1960: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1961: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 15, expected 13 ntoskrnl.c:1967: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1968: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 15, expected 1 ntoskrnl.c:1973: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1974: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1977: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1978: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1981: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1982: Test failed: id 0 poll: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1986: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1988: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1991: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1992: Test failed: id 0 poll: HidP_GetValueCaps returned count 0, expected 7 ntoskrnl.c:1998: Test failed: id 0 poll: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1999: Test failed: id 0 poll: HidP_GetValueCaps returned count 16, expected 7 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got UsagePage 3a43, expected 0001 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got ReportID 92, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsAlias 87, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got BitField 28265, expected 2 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got LinkCollection 28516, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got LinkUsage 29559, expected 4 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got LinkUsagePage 18780, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsRange 78, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsStringRange 70, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsDesignatorRange 92, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got IsAbsolute 111, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got HasNull 101, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got BitSize 11830, expected 8 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[0]: got ReportCount 28265, expected 1 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[1]: got ReportID 1, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[2]: got ReportID 1, expected 0 ntoskrnl.c:2005: Test failed: id 0 poll: value_caps[3]: got ReportID 1, expected 0 ntoskrnl.c:2011: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2013: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2016: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2017: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 0, expected 7 ntoskrnl.c:2024: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2025: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 12, expected 7 ntoskrnl.c:2027: Test failed: id 0 poll: got UsagePage 0001, expected 3a43 ntoskrnl.c:2027: Test failed: id 0 poll: got ReportID 1, expected 92 ntoskrnl.c:2027: Test failed: id 0 poll: got IsAlias 0, expected 87 ntoskrnl.c:2027: Test failed: id 0 poll: got BitField 2, expected 28265 ntoskrnl.c:2027: Test failed: id 0 poll: got LinkCollection 1, expected 28516 ntoskrnl.c:2027: Test failed: id 0 poll: got LinkUsage 4, expected 29559 ntoskrnl.c:2027: Test failed: id 0 poll: got LinkUsagePage 1, expected 18780 ntoskrnl.c:2027: Test failed: id 0 poll: got IsRange 0, expected 78 ntoskrnl.c:2027: Test failed: id 0 poll: got IsStringRange 0, expected 70 ntoskrnl.c:2027: Test failed: id 0 poll: got IsDesignatorRange 0, expected 92 ntoskrnl.c:2027: Test failed: id 0 poll: got IsAbsolute 1, expected 111 ntoskrnl.c:2027: Test failed: id 0 poll: got HasNull 0, expected 101 ntoskrnl.c:2027: Test failed: id 0 poll: got BitSize 4, expected 11830 ntoskrnl.c:2027: Test failed: id 0 poll: got ReportCount 2, expected 28265 ntoskrnl.c:2027: Test failed: id 0 poll: got LogicalMin 1, expected -128 ntoskrnl.c:2027: Test failed: id 0 poll: got LogicalMax 8, expected 127 ntoskrnl.c:2035: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2041: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2042: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2045: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2046: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2049: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2050: Test failed: id 0 poll: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2055: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2057: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2059: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2061: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2065: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2070: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2074: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2078: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2082: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2086: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2090: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2094: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2099: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2103: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2104: Test failed: id 0 poll: got value deadbeef, expected 0x80 ntoskrnl.c:2108: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2109: Test failed: id 0 poll: got value deadbeef, expected 0xffffff80 ntoskrnl.c:2114: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2118: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2119: Test failed: id 0 poll: got value deadbeef, expected 0x7f ntoskrnl.c:2124: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2128: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2129: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2134: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2138: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2139: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2143: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2144: Test failed: id 0 poll: got value deadbeef, expected 0x7fffffff ntoskrnl.c:2149: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2153: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2154: Test failed: id 0 poll: got value deadbeef, expected 0x7fffffff ntoskrnl.c:2159: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2163: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2164: Test failed: id 0 poll: got value deadbeef, expected 0x80000000 ntoskrnl.c:2169: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2173: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2174: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2179: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2183: Test failed: id 0 poll: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2184: Test failed: id 0 poll: got value deadbeef, expected 0 ntoskrnl.c:2189: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Input, 0) returned 0, expected 42 ntoskrnl.c:2191: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_BUTTON) returned 0, expected 32 ntoskrnl.c:2193: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_LED) returned 0, expected 8 ntoskrnl.c:2195: Test failed: id 0 poll: HidP_MaxUsageListLength(HidP_Feature, HID_USAGE_PAGE_BUTTON) returned 0, expected 8 ntoskrnl.c:2203: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2209: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2215: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2221: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2226: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2227: Test failed: id 0 poll: got usage count 16, expected 2 ntoskrnl.c:2233: Test failed: id 0 poll: got report[6] ffffffcd expected 0 ntoskrnl.c:2234: Test failed: id 0 poll: got report[7] ffffffcd expected 0 ntoskrnl.c:2238: Test failed: id 0 poll: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2241: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2245: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2250: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2256: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2257: Test failed: id 0 poll: got usage count 1, expected 2 ntoskrnl.c:2262: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2263: Test failed: id 0 poll: got usage count 16, expected 2 ntoskrnl.c:2264: Test failed: id 0 poll: got usages[0] cdcd, expected 4 ntoskrnl.c:2265: Test failed: id 0 poll: got usages[1] cdcd, expected 6 ntoskrnl.c:2271: Test failed: id 0 poll: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2272: Test failed: id 0 poll: got usage count 16, expected 2 ntoskrnl.c:2273: Test failed: id 0 poll: got usages[0] cdcd, expected 6 ntoskrnl.c:2274: Test failed: id 0 poll: got usages[1] cdcd, expected 4 ntoskrnl.c:2280: Test failed: id 0 poll: HidP_GetUsagesEx returned 0xc0110001 ntoskrnl.c:2281: Test failed: id 0 poll: got usage count 16, expected 4 ntoskrnl.c:2282: Test failed: id 0 poll: got usage_and_pages[0] UsagePage cdcd, expected 9 ntoskrnl.c:2284: Test failed: id 0 poll: got usage_and_pages[1] UsagePage cdcd, expected 9 ntoskrnl.c:2286: Test failed: id 0 poll: got usage_and_pages[2] UsagePage cdcd, expected 7 ntoskrnl.c:2288: Test failed: id 0 poll: got usage_and_pages[3] UsagePage cdcd, expected 7 ntoskrnl.c:2290: Test failed: id 0 poll: got usage_and_pages[4] UsagePage cdcd, expected 8 ntoskrnl.c:2292: Test failed: id 0 poll: got usage_and_pages[5] UsagePage cdcd, expected 8 ntoskrnl.c:2294: Test failed: id 0 poll: got usage_and_pages[0] Usage cdcd, expected 4 ntoskrnl.c:2296: Test failed: id 0 poll: got usage_and_pages[1] Usage cdcd, expected 6 ntoskrnl.c:2298: Test failed: id 0 poll: got usage_and_pages[2] Usage cdcd, expected 9 ntoskrnl.c:2300: Test failed: id 0 poll: got usage_and_pages[3] Usage cdcd, expected b ntoskrnl.c:2302: Test failed: id 0 poll: got usage_and_pages[4] Usage cdcd, expected 6 ntoskrnl.c:2304: Test failed: id 0 poll: got usage_and_pages[5] Usage cdcd, expected 4 ntoskrnl.c:2310: Test failed: id 0 poll: HidP_MaxDataListLength(HidP_Input) returned 0, expected 50 ntoskrnl.c:2314: Test failed: id 0 poll: HidP_MaxDataListLength(HidP_Feature) returned 0, expected 13 ntoskrnl.c:2318: Test failed: id 0 poll: HidP_GetData returned 0xc0110001 ntoskrnl.c:2319: Test failed: id 0 poll: got data count 1, expected 11 ntoskrnl.c:2322: Test failed: id 0 poll: HidP_GetData returned 0xc0110001 ntoskrnl.c:2326: Test failed: id 0 poll: data[1]: got DataIndex 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[2]: got DataIndex 0, expected 5 ntoskrnl.c:2327: Test failed: id 0 poll: data[2]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[3]: got DataIndex 0, expected 7 ntoskrnl.c:2327: Test failed: id 0 poll: data[3]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[4]: got DataIndex 0, expected 19 ntoskrnl.c:2327: Test failed: id 0 poll: data[4]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[5]: got DataIndex 0, expected 21 ntoskrnl.c:2327: Test failed: id 0 poll: data[5]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[6]: got DataIndex 0, expected 30 ntoskrnl.c:2326: Test failed: id 0 poll: data[7]: got DataIndex 0, expected 31 ntoskrnl.c:2326: Test failed: id 0 poll: data[8]: got DataIndex 0, expected 32 ntoskrnl.c:2327: Test failed: id 0 poll: data[8]: got RawValue 0, expected -17970434 ntoskrnl.c:2326: Test failed: id 0 poll: data[9]: got DataIndex 0, expected 37 ntoskrnl.c:2327: Test failed: id 0 poll: data[9]: got RawValue 0, expected 1 ntoskrnl.c:2326: Test failed: id 0 poll: data[10]: got DataIndex 0, expected 39 ntoskrnl.c:2327: Test failed: id 0 poll: data[10]: got RawValue 0, expected 1 ntoskrnl.c:2333: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2337: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2342: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2360: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2364: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2369: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2375: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2379: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2384: Test failed: id 0 poll: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2391: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2398: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2401: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2405: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2410: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2414: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2419: Test failed: id 0 poll: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2420: Test failed: id 0 poll: got value deadbeef, expected 0x1005 ntoskrnl.c:2426: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2429: Test failed: id 0 poll: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2430: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2435: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2438: Test failed: id 0 poll: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2440: Test failed: id 0 poll: unexpected report value ntoskrnl.c:2445: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2450: Test failed: id 0 poll: HidD_GetInputReport returned error 6 ntoskrnl.c:2455: Test failed: id 0 poll: HidD_GetInputReport returned error 6 ntoskrnl.c:2464: Test failed: id 0 poll: HidD_GetInputReport returned error 6 ntoskrnl.c:2475: Test failed: id 0 poll: HidD_GetInputReport failed, last error 6 ntoskrnl.c:2476: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2481: Test failed: id 0 poll: IOCTL_HID_GET_INPUT_REPORT failed, last error 6 ntoskrnl.c:2482: Test failed: id 0 poll: got length 46, expected 3 ntoskrnl.c:2483: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2488: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2493: Test failed: id 0 poll: HidD_GetFeature returned error 6 ntoskrnl.c:2498: Test failed: id 0 poll: HidD_GetFeature returned error 6 ntoskrnl.c:2507: Test failed: id 0 poll: HidD_GetFeature returned error 6 ntoskrnl.c:2518: Test failed: id 0 poll: HidD_GetFeature failed, last error 6 ntoskrnl.c:2519: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2524: Test failed: id 0 poll: IOCTL_HID_GET_FEATURE failed, last error 6 ntoskrnl.c:2525: Test failed: id 0 poll: got length 34, expected 3 ntoskrnl.c:2526: Test failed: id 0 poll: got report[0] ffffffcd, expected 00 ntoskrnl.c:2531: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2536: Test failed: id 0 poll: HidD_SetFeature returned error 6 ntoskrnl.c:2541: Test failed: id 0 poll: HidD_SetFeature returned error 6 ntoskrnl.c:2550: Test failed: id 0 poll: HidD_SetFeature returned error 6 ntoskrnl.c:2560: Test failed: id 0 poll: HidD_SetFeature failed, last error 6 ntoskrnl.c:2566: Test failed: id 0 poll: IOCTL_HID_SET_FEATURE returned error 6 ntoskrnl.c:2570: Test failed: id 0 poll: IOCTL_HID_SET_FEATURE failed, last error 6 ntoskrnl.c:2571: Test failed: id 0 poll: got length 0, expected 3 ntoskrnl.c:2576: Test failed: id 0 poll: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2583: Test failed: id 0 poll: HidD_SetOutputReport returned error 6 ntoskrnl.c:2588: Test failed: id 0 poll: HidD_SetOutputReport returned error 6 ntoskrnl.c:2597: Test failed: id 0 poll: HidD_SetOutputReport returned error 6 ntoskrnl.c:2607: Test failed: id 0 poll: HidD_SetOutputReport failed, last error 6 ntoskrnl.c:2613: Test failed: id 0 poll: IOCTL_HID_SET_OUTPUT_REPORT returned error 6 ntoskrnl.c:2617: Test failed: id 0 poll: IOCTL_HID_SET_OUTPUT_REPORT failed, last error 6 ntoskrnl.c:2618: Test failed: id 0 poll: got length 0, expected 3 ntoskrnl.c:2624: Test failed: id 0 poll: WriteFile returned error 6 ntoskrnl.c:2629: Test failed: id 0 poll: WriteFile returned error 6 ntoskrnl.c:2640: Test failed: id 0 poll: WriteFile returned error 6 ntoskrnl.c:2654: Test failed: id 0 poll: WriteFile failed, last error 6 ntoskrnl.c:2655: Test failed: id 0 poll: WriteFile wrote 0 ntoskrnl.c:2662: Test failed: id 0 poll: ReadFile failed, last error 6 ntoskrnl.c:2666: Test failed: id 0 poll: ReadFile failed, last error 6 ntoskrnl.c:2674: Test failed: id 0 poll: ReadFile failed, last error 6 ntoskrnl.c:2675: Test failed: id 0 poll: ReadFile returned 0 ntoskrnl.c:2676: Test failed: id 0 poll: unexpected report data ntoskrnl.c:2685: Test failed: id 0 poll: ReadFile returned error 6 ntoskrnl: Timeout
Same spurious failure as usual, running the patch again works fine:
https://testbot.winehq.org/JobDetails.pl?Key=95537