• Arkadiusz Hiler's avatar
    hidclass.sys: Calculate correct bitCount for vendor-specific 1 bit repeated elements. · 5a32339d
    Arkadiusz Hiler authored
    DualSense controller's report descriptor comes with a 1 bit vendor specific
    (Usage Page & Usage) element repeated through 'report count'.
    
    Those were correctly interpreted as non-ranged buttons (exposed as button caps
    with appropriate usage values) but their size was incorrectly assumed to be 1
    ignoring the 'report count'.
    
    Because of that the InputReportByteLength is miscalculated as 63 instead of
    64. If the buffer passed to HidD_GetInputReport() is allocated using that
    value the call will fail with ERROR_INSUFFICIENT_BUFFER.
    
    This change fixes the above and cleans up the code a bit so the size for each
    case is calculated directly from the count and size instead of using the
    values that were derived from them.
    Signed-off-by: 's avatarArkadiusz Hiler <ahiler@codeweavers.com>
    Signed-off-by: 's avatarAric Stewart <aric@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    5a32339d
Name
Last commit
Last update
..
Makefile.in Loading commit data...
buffer.c Loading commit data...
descriptor.c Loading commit data...
device.c Loading commit data...
hid.h Loading commit data...
hidclass.sys.spec Loading commit data...
main.c Loading commit data...
pnp.c Loading commit data...