Aric Stewart : hidclass.sys: Handle descriptors with a usage count less than the report bits.
Alexandre Julliard
julliard at winehq.org
Tue Nov 15 17:56:16 CST 2016
Module: wine
Branch: master
Commit: 437f7a372205e9218e279abed1f9ad85980c3d49
URL: http://source.winehq.org/git/wine.git/?a=commit;h=437f7a372205e9218e279abed1f9ad85980c3d49
Author: Aric Stewart <aric at codeweavers.com>
Date: Mon Nov 14 07:18:34 2016 -0600
hidclass.sys: Handle descriptors with a usage count less than the report bits.
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/hidclass.sys/descriptor.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/hidclass.sys/descriptor.c b/dlls/hidclass.sys/descriptor.c
index e1c48dd..9a80f68 100644
--- a/dlls/hidclass.sys/descriptor.c
+++ b/dlls/hidclass.sys/descriptor.c
@@ -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);
More information about the wine-cvs
mailing list