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);