Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/ntoskrnl.exe/tests/driver_hid.c | 23 ++++++++++++++++++++++- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 8 ++++---- 2 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index 819d4174dcf..527dad65b53 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -100,6 +100,27 @@ static const unsigned char report_descriptor[] = REPORT_SIZE(1, 8), REPORT_COUNT(1, 2), INPUT(1, Data|Var|Abs), + + USAGE_PAGE(1, HID_USAGE_PAGE_BUTTON), + USAGE_MINIMUM(1, 1), + USAGE_MAXIMUM(1, 8), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 1), + PHYSICAL_MINIMUM(1, 0), + PHYSICAL_MAXIMUM(1, 1), + REPORT_COUNT(1, 8), + REPORT_SIZE(1, 1), + INPUT(1, Data|Var|Abs), + + 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, 2), + INPUT(1, Data|Var|Abs), END_COLLECTION, };
@@ -180,7 +201,7 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp)
case IOCTL_HID_READ_REPORT: ok(!in_size, "got input size %u\n", in_size); - todo_wine ok(out_size == 2, "got output size %u\n", out_size); + todo_wine ok(out_size == 4, "got output size %u\n", out_size);
ret = STATUS_NOT_IMPLEMENTED; break; diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 6b70d98b6fd..27c8bcb33db 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1555,13 +1555,13 @@ static void test_hid_device(void)
ok(caps.Usage == HID_USAGE_GENERIC_JOYSTICK, "unexpected caps Usage %x, expected %x\n", caps.Usage, HID_USAGE_GENERIC_JOYSTICK); ok(caps.UsagePage == HID_USAGE_PAGE_GENERIC, "unexpected caps UsagePage %x, expected %x\n", caps.UsagePage, HID_USAGE_PAGE_GENERIC); - ok(caps.InputReportByteLength == 3, "unexpected caps InputReportByteLength %d, expected %d\n", caps.InputReportByteLength, 3); + ok(caps.InputReportByteLength == 5, "unexpected caps InputReportByteLength %d, expected %d\n", caps.InputReportByteLength, 5); ok(caps.OutputReportByteLength == 0, "unexpected caps OutputReportByteLength %d, expected %d\n", caps.OutputReportByteLength, 0); ok(caps.FeatureReportByteLength == 0, "unexpected caps FeatureReportByteLength %d, expected %d\n", caps.FeatureReportByteLength, 0); ok(caps.NumberLinkCollectionNodes == 1, "unexpected caps NumberLinkCollectionNodes %d, expected %d\n", caps.NumberLinkCollectionNodes, 1); - ok(caps.NumberInputButtonCaps == 0, "unexpected caps NumberInputButtonCaps %d, expected %d\n", caps.NumberInputButtonCaps, 0); - ok(caps.NumberInputValueCaps == 2, "unexpected caps NumberInputValueCaps %d, expected %d\n", caps.NumberInputValueCaps, 2); - ok(caps.NumberInputDataIndices == 2, "unexpected caps NumberInputDataIndices %d, expected %d\n", caps.NumberInputDataIndices, 2); + ok(caps.NumberInputButtonCaps == 1, "unexpected caps NumberInputButtonCaps %d, expected %d\n", caps.NumberInputButtonCaps, 1); + ok(caps.NumberInputValueCaps == 3, "unexpected caps NumberInputValueCaps %d, expected %d\n", caps.NumberInputValueCaps, 3); + ok(caps.NumberInputDataIndices == 11, "unexpected caps NumberInputDataIndices %d, expected %d\n", caps.NumberInputDataIndices, 11); ok(caps.NumberOutputButtonCaps == 0, "unexpected caps NumberOutputButtonCaps %d, expected %d\n", caps.NumberOutputButtonCaps, 0); ok(caps.NumberOutputValueCaps == 0, "unexpected caps NumberOutputValueCaps %d, expected %d\n", caps.NumberOutputValueCaps, 0); ok(caps.NumberOutputDataIndices == 0, "unexpected caps NumberOutputDataIndices %d, expected %d\n", caps.NumberOutputDataIndices, 0);