dinput: Remove unusual HID joystick button count FIXMEs.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-09-28 09:30:15 +02:00 committed by Alexandre Julliard
parent 5732347cbe
commit e4766cad6d
1 changed files with 1 additions and 5 deletions

View File

@ -359,9 +359,7 @@ static BOOL enum_objects( struct hid_joystick *impl, const DIPROPHEADER *header,
TRACE( "Ignoring input button %s, usage page not implemented.\n", debugstr_hid_caps( &caps ) ); TRACE( "Ignoring input button %s, usage page not implemented.\n", debugstr_hid_caps( &caps ) );
else if (caps.button->IsRange) else if (caps.button->IsRange)
{ {
if (caps.button->NotRange.Usage >= 128) for (j = caps.button->Range.UsageMin; j <= caps.button->Range.UsageMax; ++j)
FIXME( "Ignoring input button %s, too many buttons.\n", debugstr_hid_caps( &caps ) );
else for (j = caps.button->Range.UsageMin; j <= caps.button->Range.UsageMax; ++j)
{ {
instance.dwOfs = button_ofs + (j - caps.button->Range.UsageMin); instance.dwOfs = button_ofs + (j - caps.button->Range.UsageMin);
instance.dwType = DIDFT_PSHBUTTON | DIDFT_MAKEINSTANCE( button++ ); instance.dwType = DIDFT_PSHBUTTON | DIDFT_MAKEINSTANCE( button++ );
@ -375,8 +373,6 @@ static BOOL enum_objects( struct hid_joystick *impl, const DIPROPHEADER *header,
if (ret != DIENUM_CONTINUE) return ret; if (ret != DIENUM_CONTINUE) return ret;
} }
} }
else if (caps.button->NotRange.Usage >= 128)
FIXME( "Ignoring input button %s, too many buttons.\n", debugstr_hid_caps( &caps ) );
else else
{ {
instance.dwOfs = button_ofs; instance.dwOfs = button_ofs;