SDL: Add 8BitDo to the list of Xbox 360 third party vendors (5efca)

From 5efca283d3041f17f386d5b60d4fce7ef776de07 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 28 Nov 2022 13:47:30 -0800
Subject: [PATCH] Add 8BitDo to the list of Xbox 360 third party vendors

Allows detection of the 8BitDo Ultimate Wired Controller
---
 .../app/src/main/java/org/libsdl/app/HIDDeviceManager.java     | 3 ++-
 src/hidapi/libusb/hid.c                                        | 1 +
 src/joystick/hidapi/SDL_hidapijoystick.c                       | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java b/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
index cf3c9267fbd9..e695a1772868 100644
--- a/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
+++ b/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
@@ -251,6 +251,7 @@ private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterfa
             0x20d6, // PowerA
             0x24c6, // PowerA
             0x2c22, // Qanba
+            0x2dc8, // 8BitDo
         };
 
         if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
@@ -278,7 +279,7 @@ private boolean isXboxOneController(UsbDevice usbDevice, UsbInterface usbInterfa
             0x1532, // Razer Wildcat
             0x20d6, // PowerA
             0x24c6, // PowerA
-            0x2dc8, /* 8BitDo */
+            0x2dc8, // 8BitDo
             0x2e24, // Hyperkin
         };
 
diff --git a/src/hidapi/libusb/hid.c b/src/hidapi/libusb/hid.c
index 353ceda258a1..367288ace374 100644
--- a/src/hidapi/libusb/hid.c
+++ b/src/hidapi/libusb/hid.c
@@ -682,6 +682,7 @@ static int is_xbox360(unsigned short vendor_id, const struct libusb_interface_de
 		0x20d6, /* PowerA */
 		0x24c6, /* PowerA */
 		0x2c22, /* Qanba */
+		0x2dc8, /* 8BitDo */
 	};
 
 	if (intf_desc->bInterfaceClass == LIBUSB_CLASS_VENDOR_SPEC &&
diff --git a/src/joystick/hidapi/SDL_hidapijoystick.c b/src/joystick/hidapi/SDL_hidapijoystick.c
index 7228d0381ff9..ff541a7e7418 100644
--- a/src/joystick/hidapi/SDL_hidapijoystick.c
+++ b/src/joystick/hidapi/SDL_hidapijoystick.c
@@ -165,6 +165,7 @@ SDL_GetJoystickGameControllerProtocol(const char *name, Uint16 vendor, Uint16 pr
             0x20d6, /* PowerA */
             0x24c6, /* PowerA */
             0x2c22, /* Qanba */
+            0x2dc8, /* 8BitDo */
         };
 
         int i;