SDL: Assume all 8BitDo Xbox controllers have a share button (1dbe8)

From 1dbe85efd15207d5487c68cfed53c6f98a0f31b5 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 8 Nov 2023 00:34:50 -0800
Subject: [PATCH] Assume all 8BitDo Xbox controllers have a share button

Fixes https://github.com/libsdl-org/SDL/issues/8174

(cherry picked from commit 8049af3355975c25bc5ac29ac518893d776a769b)
(cherry picked from commit 524ccf033fa558737931ab0af1189c8f332ba39c)
---
 src/joystick/SDL_joystick.c | 10 +++++++---
 src/joystick/usb_ids.h      |  1 -
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 834e83d99ee9..552d105fe647 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -2346,9 +2346,13 @@ SDL_bool SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id)
         }
     }
     if (vendor_id == USB_VENDOR_8BITDO) {
-        if (product_id == USB_PRODUCT_8BITDO_XBOX_CONTROLLER) {
-            return SDL_TRUE;
-        }
+        /* 8BitDo started making Xbox form factor controllers after the Series X
+         * release, so we'll assume for now that they all have the share button.
+         *
+         * We know for sure that the Ultimate Wired Controller for Xbox (0x2002)
+         * and the Ultimate Wireless / Pro 2 Wired Controller (0x3106) have them.
+         */
+        return SDL_TRUE;
     }
     return SDL_FALSE;
 }
diff --git a/src/joystick/usb_ids.h b/src/joystick/usb_ids.h
index bc9e319e4891..1fcdab95c45e 100644
--- a/src/joystick/usb_ids.h
+++ b/src/joystick/usb_ids.h
@@ -52,7 +52,6 @@
 #define USB_VENDOR_VALVE        0x28de
 #define USB_VENDOR_ZEROPLUS     0x0c12
 
-#define USB_PRODUCT_8BITDO_XBOX_CONTROLLER                0x2002
 #define USB_PRODUCT_AMAZON_LUNA_CONTROLLER                0x0419
 #define USB_PRODUCT_ASTRO_C40_XBOX360                     0x0024
 #define USB_PRODUCT_BACKBONE_ONE_IOS                      0x0103