On Mon Nov 21 17:51:19 2022 +0000, Matthew Tran wrote:
if (!(caps->flags & HID_VALUE_CAPS_IS_RANGE)) bit_count *= caps->report_count;
We only want to do this if `HidP_*UsageValueArray` is called, if it's `HidP_*UsageValue` we only [handle the first item](https://learn.microsoft.com/en-us/windows-hardware/drivers/hid/value-capabil...). Or is the documentation wrong and Windows actually does this?
You're right, I've pushed some update to my branch, with new tests to validate that.
Fun fact, I remember being confused by the array flavor that returned `HIDP_STATUS_NOT_IMPLEMENTED` when I tried using it. The new tests uncovered that it only does when the elements are smaller than a byte.
I don't really see how it is any more difficult to cover that case than to cover it with more bits but well, so be it. Wine just does it better ;).