hidclass.sys: Treat all one-bit fields as buttons.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2019-05-03 12:00:50 +02:00 committed by Alexandre Julliard
parent 37d129e8fe
commit 4316373998
1 changed files with 2 additions and 2 deletions

View File

@ -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;