135ae829
by Thomas Portal at 2026-06-30T12:07:12+02:00
hidclass: Return the full report length from IOCTL_HID_WRITE_REPORT.
WriteFile on a HID output report returns the output report length on
Windows, regardless of the transfer length the minidriver reports.
hid_device_xfer_report instead forwarded the minidriver count after
subtracting the report ID byte, so on a numbered report WriteFile came up
one byte short. An application that follows the returned count to drive an
upload then stalls; the Elgato Stream Deck image upload does exactly that.
Report the output report length on completion instead of adjusting the
minidriver count.
The dinput test masked this: its mock bus driver returned report_len + 1
and the subtraction cancelled the extra byte. Have the mock return an
unrelated length so the test checks that hidclass returns the output
report length and not the count the minidriver reported.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59891
Signed-off-by: Thomas Portal <portal.thomas@protonmail.com>