Skip to content

Commit 3c04c88

Browse files
8BitDoslouken
authored andcommitted
Add support for Pro3
Add support for Pro3
1 parent d5efb11 commit 3c04c88

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/joystick/hidapi/SDL_hidapi_8bitdo.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ static bool HIDAPI_Driver8BitDo_IsSupportedDevice(SDL_HIDAPI_Device *device, con
145145
case USB_PRODUCT_8BITDO_SN30_PRO_BT:
146146
case USB_PRODUCT_8BITDO_PRO_2:
147147
case USB_PRODUCT_8BITDO_PRO_2_BT:
148+
case USB_PRODUCT_8BITDO_PRO_3:
148149
case USB_PRODUCT_8BITDO_ULTIMATE2_WIRELESS:
149150
return true;
150151
default:
@@ -219,6 +220,8 @@ static bool HIDAPI_Driver8BitDo_InitDevice(SDL_HIDAPI_Device *device)
219220
HIDAPI_SetDeviceName(device, "8BitDo SN30 Pro");
220221
} else if (device->product_id == USB_PRODUCT_8BITDO_PRO_2 || device->product_id == USB_PRODUCT_8BITDO_PRO_2_BT) {
221222
HIDAPI_SetDeviceName(device, "8BitDo Pro 2");
223+
} else if (device->product_id == USB_PRODUCT_8BITDO_PRO_3) {
224+
HIDAPI_SetDeviceName(device, "8BitDo Pro 3");
222225
}
223226

224227
return HIDAPI_JoystickConnected(device, NULL);
@@ -253,6 +256,7 @@ static Uint64 HIDAPI_Driver8BitDo_GetIMURateForProductID(SDL_HIDAPI_Device *devi
253256
// This firmware appears to update at 100 Hz over USB
254257
return 100;
255258
}
259+
case USB_PRODUCT_8BITDO_PRO_3:
256260
case USB_PRODUCT_8BITDO_PRO_2:
257261
case USB_PRODUCT_8BITDO_PRO_2_BT: // Note, labeled as "BT" but appears this way when wired.
258262
if (device->is_bluetooth) {
@@ -287,6 +291,7 @@ static bool HIDAPI_Driver8BitDo_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joys
287291
// Initialize the joystick capabilities
288292
if (device->product_id == USB_PRODUCT_8BITDO_PRO_2 ||
289293
device->product_id == USB_PRODUCT_8BITDO_PRO_2_BT ||
294+
device->product_id == USB_PRODUCT_8BITDO_PRO_3 ||
290295
device->product_id == USB_PRODUCT_8BITDO_ULTIMATE2_WIRELESS) {
291296
// This controller has additional buttons
292297
joystick->nbuttons = SDL_GAMEPAD_NUM_8BITDO_BUTTONS;

src/joystick/usb_ids.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
#define USB_VENDOR_VALVE 0x28de
6161
#define USB_VENDOR_ZEROPLUS 0x0c12
6262

63-
#define USB_PRODUCT_8BITDO_ULTIMATE2_WIRELESS 0x6012
63+
#define USB_PRODUCT_8BITDO_ULTIMATE2_WIRELESS 0x6012 // mode switch to BT
64+
#define USB_PRODUCT_8BITDO_PRO_3 0x6009 // mode switch to D
6465
#define USB_PRODUCT_8BITDO_SF30_PRO 0x6000 // B + START
6566
#define USB_PRODUCT_8BITDO_SF30_PRO_BT 0x6100 // B + START
6667
#define USB_PRODUCT_8BITDO_SN30_PRO 0x6001 // B + START

0 commit comments

Comments
 (0)