Commit eb223bf5 authored by Ivo Ivanov's avatar Ivo Ivanov Committed by Alexandre Julliard

dinput: Ignore input caps from the PID usage page.

Prevents PID usage page input reports from being parsed and listed in the device objects, increasing the total number of buttons or axes. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51873Signed-off-by: 's avatarIvo Ivanov <logos128@gmail.com> Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent fe78540b
......@@ -414,7 +414,13 @@ static BOOL enum_objects( struct hid_joystick *impl, const DIPROPHEADER *header,
if (!caps->usage_page) continue;
if (caps->flags & HID_VALUE_CAPS_IS_BUTTON) continue;
if (caps->usage_page >= HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN)
if (caps->usage_page == HID_USAGE_PAGE_PID)
{
TRACE( "Ignoring input caps %s, PID specific.\n", debugstr_hid_value_caps( caps ) );
value_ofs += (caps->usage_max - caps->usage_min + 1) * sizeof(LONG);
object += caps->usage_max - caps->usage_min + 1;
}
else if (caps->usage_page >= HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN)
{
TRACE( "Ignoring input value %s, vendor specific.\n", debugstr_hid_value_caps( caps ) );
value_ofs += (caps->usage_max - caps->usage_min + 1) * sizeof(LONG);
......@@ -469,7 +475,13 @@ static BOOL enum_objects( struct hid_joystick *impl, const DIPROPHEADER *header,
if (!caps->usage_page) continue;
if (!(caps->flags & HID_VALUE_CAPS_IS_BUTTON)) continue;
if (caps->usage_page >= HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN)
if (caps->usage_page == HID_USAGE_PAGE_PID)
{
TRACE( "Ignoring input caps %s, PID specific.\n", debugstr_hid_value_caps( caps ) );
button_ofs += caps->usage_max - caps->usage_min + 1;
object += caps->usage_max - caps->usage_min + 1;
}
else if (caps->usage_page >= HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN)
{
TRACE( "Ignoring input button %s, vendor specific.\n", debugstr_hid_value_caps( caps ) );
button_ofs += caps->usage_max - caps->usage_min + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment