hidclass.sys: Handle descriptors with a usage count less than the report bits.
Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3b3b7670ec
commit
437f7a3722
|
@ -752,7 +752,12 @@ static void build_elements(WINE_HID_REPORT *wine_report, struct feature* feature
|
|||
wine_element->caps.value.HasNull = feature->HasNull;
|
||||
wine_element->caps.value.BitSize = feature->caps.BitSize;
|
||||
if (feature->caps.usage_count > 1)
|
||||
wine_element->caps.value.ReportCount = 1;
|
||||
{
|
||||
if (feature->caps.ReportCount > feature->caps.usage_count)
|
||||
wine_element->caps.value.ReportCount = feature->caps.ReportCount / feature->caps.usage_count;
|
||||
else
|
||||
wine_element->caps.value.ReportCount = 1;
|
||||
}
|
||||
else
|
||||
wine_element->caps.value.ReportCount = feature->caps.ReportCount;
|
||||
wine_element->bitCount = (feature->caps.BitSize * wine_element->caps.value.ReportCount);
|
||||
|
|
Loading…
Reference in New Issue