Rémi Bernon : dinput: Remove unusual HID joystick button count FIXMEs.

Alexandre Julliard julliard at winehq.org
Tue Sep 28 16:01:57 CDT 2021


Module: wine
Branch: master
Commit: e4766cad6d25451ecc4b1248933329204ad80098
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e4766cad6d25451ecc4b1248933329204ad80098

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue Sep 28 09:30:15 2021 +0200

dinput: Remove unusual HID joystick button count FIXMEs.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dinput/joystick_hid.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index a8f8077863b..29cb8990689 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -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 ) );
         else if (caps.button->IsRange)
         {
-            if (caps.button->NotRange.Usage >= 128)
-                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)
+            for (j = caps.button->Range.UsageMin; j <= caps.button->Range.UsageMax; ++j)
             {
                 instance.dwOfs = button_ofs + (j - caps.button->Range.UsageMin);
                 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;
             }
         }
-        else if (caps.button->NotRange.Usage >= 128)
-            FIXME( "Ignoring input button %s, too many buttons.\n", debugstr_hid_caps( &caps ) );
         else
         {
             instance.dwOfs = button_ofs;




More information about the wine-cvs mailing list