SDL: Ignore both the mouse and keyboard endpoints of Steam Controllers when enumerating game controllers

From 4f58445f0389ca1a2a7d4bb03248007484038df1 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 31 May 2023 14:28:50 -0700
Subject: [PATCH] Ignore both the mouse and keyboard endpoints of Steam
 Controllers when enumerating game controllers

---
 src/hidapi/SDL_hidapi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/hidapi/SDL_hidapi.c b/src/hidapi/SDL_hidapi.c
index b2db1fdfc19c..251e9662df83 100644
--- a/src/hidapi/SDL_hidapi.c
+++ b/src/hidapi/SDL_hidapi.c
@@ -1061,8 +1061,8 @@ SDL_bool SDL_HIDAPI_ShouldIgnoreDevice(Uint16 vendor_id, Uint16 product_id, Uint
     /* See if there are any devices we should skip in enumeration */
     if (SDL_hidapi_only_controllers && usage_page) {
         if (vendor_id == USB_VENDOR_VALVE) {
-            /* Ignore the keyboard interface on Steam Controllers */
-            if (usage == USB_USAGE_GENERIC_KEYBOARD) {
+            /* Ignore the mouse/keyboard interface on Steam Controllers */
+            if (usage == USB_USAGE_GENERIC_KEYBOARD || usage == USB_USAGE_GENERIC_MOUSE) {
                 return SDL_TRUE;
             }
         } else if (usage_page == USB_USAGEPAGE_GENERIC_DESKTOP &&