Просмотр исходного кода

Added support for the Razer Raiju V5 Pro

(cherry picked from commit 015d0fc2e460ce27439a6f4ec53093d11ff90b70)
Sam Lantinga 1 месяц назад
Родитель
Сommit
92d6308aac
3 измененных файлов с 5 добавлено и 2 удалено
  1. 1 0
      src/joystick/controller_list.h
  2. 3 2
      src/joystick/hidapi/SDL_hidapi_ps5.c
  3. 1 0
      src/joystick/usb_ids.h

+ 1 - 0
src/joystick/controller_list.h

@@ -159,6 +159,7 @@ static const ControllerDescription_t arrControllers[] = {
 	{ MAKE_CONTROLLER_ID( 0x1532, 0x100b ), k_eControllerType_PS5Controller, NULL },	// Razer Wolverine V2 Pro (Wired)
 	{ MAKE_CONTROLLER_ID( 0x1532, 0x100c ), k_eControllerType_PS5Controller, NULL },	// Razer Wolverine V2 Pro (Wireless)
 	{ MAKE_CONTROLLER_ID( 0x1532, 0x1012 ), k_eControllerType_PS5Controller, NULL },	// Razer Kitsune
+	{ MAKE_CONTROLLER_ID( 0x1532, 0x1024 ), k_eControllerType_PS5Controller, NULL },	// Razer Raiju V3 Pro
 	{ MAKE_CONTROLLER_ID( 0x3285, 0x0d18 ), k_eControllerType_PS5Controller, NULL },	// NACON Revolution 5 Pro (PS5 mode with dongle)
 	{ MAKE_CONTROLLER_ID( 0x3285, 0x0d19 ), k_eControllerType_PS5Controller, NULL },	// NACON Revolution 5 Pro (PS5 mode wired)
 	{ MAKE_CONTROLLER_ID( 0x358a, 0x0104 ), k_eControllerType_PS5Controller, NULL },	// Backbone One PlayStation Edition for iOS

+ 3 - 2
src/joystick/hidapi/SDL_hidapi_ps5.c

@@ -515,8 +515,9 @@ static bool HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device)
             ctx->touchpad_supported = true;
             ctx->use_alternate_report = true;
         } else if (device->vendor_id == USB_VENDOR_RAZER &&
-                   device->product_id == USB_PRODUCT_RAZER_KITSUNE) {
-            // The Razer Kitsune doesn't respond to the detection protocol, but has a touchpad
+                   (device->product_id == USB_PRODUCT_RAZER_KITSUNE ||
+                    device->product_id == USB_PRODUCT_RAZER_RAIJU_V3_PRO)) {
+            // The Razer Kitsune and Raiju don't respond to the detection protocol, but have a touchpad
             joystick_type = SDL_JOYSTICK_TYPE_ARCADE_STICK;
             ctx->touchpad_supported = true;
             ctx->use_alternate_report = true;

+ 1 - 0
src/joystick/usb_ids.h

@@ -124,6 +124,7 @@
 #define USB_PRODUCT_RAZER_PANTHERA                        0x0401
 #define USB_PRODUCT_RAZER_PANTHERA_EVO                    0x1008
 #define USB_PRODUCT_RAZER_RAIJU                           0x1000
+#define USB_PRODUCT_RAZER_RAIJU_V3_PRO                    0x1024
 #define USB_PRODUCT_RAZER_TOURNAMENT_EDITION_USB          0x1007
 #define USB_PRODUCT_RAZER_TOURNAMENT_EDITION_BLUETOOTH    0x100a
 #define USB_PRODUCT_RAZER_ULTIMATE_EDITION_USB            0x1004