Zebediah Figura : hidclass.sys: Don't reset the report count when recording a main item.
Alexandre Julliard
julliard at winehq.org
Wed Mar 18 15:42:02 CDT 2020
Module: wine
Branch: master
Commit: 4c1ff566dd22a16f30f978754d6f82ce50fb79ab
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4c1ff566dd22a16f30f978754d6f82ce50fb79ab
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Mon Mar 16 21:18:05 2020 -0500
hidclass.sys: Don't reset the report count when recording a main item.
The report count is global and should be preserved.
This fixes the Logitech Extreme 3D Pro controller when used with hidraw.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/hidclass.sys/descriptor.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/hidclass.sys/descriptor.c b/dlls/hidclass.sys/descriptor.c
index 876369ad70..56e4da4ad1 100644
--- a/dlls/hidclass.sys/descriptor.c
+++ b/dlls/hidclass.sys/descriptor.c
@@ -505,7 +505,7 @@ static int parse_descriptor(BYTE *descriptor, unsigned int index, unsigned int l
case TAG_MAIN_INPUT:
case TAG_MAIN_OUTPUT:
case TAG_MAIN_FEATURE:
- for (j = 0; caps->ReportCount; j++)
+ for (j = 0; j < caps->ReportCount; j++)
{
feature = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*feature));
list_add_tail(&collection->features, &feature->entry);
@@ -520,13 +520,13 @@ static int parse_descriptor(BYTE *descriptor, unsigned int index, unsigned int l
caps->u.NotRange.Usage = usages[j];
feature->caps = *caps;
feature->caps.ReportCount = 1;
- caps->ReportCount--;
feature->collection = collection;
if (j+1 >= usages_top)
+ {
+ feature->caps.ReportCount += caps->ReportCount - (j + 1);
break;
+ }
}
- if (caps->ReportCount)
- feature->caps.ReportCount += caps->ReportCount;
usages_top = 0;
new_caps(caps);
break;
More information about the wine-cvs
mailing list