Piotr Caban : hidclass.sys: Treat all one-bit fields as buttons.
Alexandre Julliard
julliard at winehq.org
Mon May 6 15:38:49 CDT 2019
Module: wine
Branch: master
Commit: 431637399820454daa3607a7f745a6884c38ea7d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=431637399820454daa3607a7f745a6884c38ea7d
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri May 3 12:00:50 2019 +0200
hidclass.sys: Treat all one-bit fields as buttons.
Signed-off-by: Piotr Caban <piotr 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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/hidclass.sys/descriptor.c b/dlls/hidclass.sys/descriptor.c
index 279d8dd..4686b71 100644
--- a/dlls/hidclass.sys/descriptor.c
+++ b/dlls/hidclass.sys/descriptor.c
@@ -707,7 +707,7 @@ static void build_elements(WINE_HID_REPORT *wine_report, struct feature* feature
WINE_HID_ELEMENT *wine_element = &wine_report->Elements[wine_report->elementCount];
wine_element->valueStartBit = *bitOffset;
- if (feature->caps.UsagePage == HID_USAGE_PAGE_BUTTON)
+ if (feature->caps.BitSize == 1)
{
wine_element->ElementType = ButtonElement;
wine_element->caps.button.UsagePage = feature->caps.UsagePage;
@@ -809,7 +809,7 @@ static void build_elements(WINE_HID_REPORT *wine_report, struct feature* feature
static void count_elements(struct feature* feature, USHORT *buttons, USHORT *values)
{
- if (feature->caps.UsagePage == HID_USAGE_PAGE_BUTTON)
+ if (feature->caps.BitSize == 1)
{
if (feature->caps.IsRange)
*buttons = *buttons + 1;
More information about the wine-cvs
mailing list