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

Add Void GENESIS controller support

Add AndGAMER/Void Gaming USB IDs for Void GENESIS.

Recognize the Void GENESIS SInput VID/PID pair and set its device name.
Add DirectInput gamepad mappings for the wired and dongle DirectInput modes.
BZL 2 недель назад
Родитель
Сommit
111bb79bf8

+ 2 - 0
src/joystick/SDL_gamepad_db.h

@@ -337,6 +337,8 @@ static const char *s_GamepadMappings[] = {
     "03000000790000001b18000000000000,Venom Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,",
     "030000006f0e00000302000000000000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,",
     "030000006f0e00000702000000000000,Victrix Pro Fight Stick for PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,",
+    "03000000d23800001010000000000000,Void Gaming Void GENESIS,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b2,leftstick:b9,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b18,misc2:b21,misc3:b20,paddle1:b22,paddle2:b15,paddle3:b23,paddle4:b17,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a5,start:b19,x:b3,y:b4,",
+    "03000000d23800001210000000000000,Void Gaming Void GENESIS,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b2,leftstick:b9,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b18,misc2:b21,misc3:b20,paddle1:b22,paddle2:b15,paddle3:b23,paddle4:b17,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a5,start:b19,x:b3,y:b4,",
     "03000000450c00002043000000000000,XEOX Gamepad SL-6556-BK,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,",
     "03000000341a00000608000000000000,Xeox,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,",
     "03000000172700004431000000000000,XiaoMi Game Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b20,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a7,rightx:a2,righty:a5,start:b11,x:b3,y:b4,",

+ 5 - 0
src/joystick/SDL_joystick.c

@@ -3350,6 +3350,11 @@ bool SDL_IsJoystickSInputController(Uint16 vendor_id, Uint16 product_id)
             return true;
         }
     }
+    if (vendor_id == USB_VENDOR_ANDGAMER) {
+        if (product_id == USB_PRODUCT_VOIDGAMING_GENESIS_SINPUT) {
+            return true;
+        }
+    }
     return false;
 }
 

+ 3 - 0
src/joystick/hidapi/SDL_hidapi_sinput.c

@@ -673,6 +673,9 @@ static bool HIDAPI_DriverSInput_InitDevice(SDL_HIDAPI_Device *device)
     case USB_PRODUCT_VOIDGAMING_PS4FIREBIRD:
         HIDAPI_SetDeviceName(device, "Void Gaming PS4 FireBird");
         break;
+    case USB_PRODUCT_VOIDGAMING_GENESIS_SINPUT:
+        HIDAPI_SetDeviceName(device, "Void Gaming Void GENESIS");
+        break;
     case USB_PRODUCT_BONZIRICHANNEL_FIREBIRD:
         HIDAPI_SetDeviceName(device, "Bonziri FireBird");
         break;

+ 2 - 0
src/joystick/usb_ids.h

@@ -26,6 +26,7 @@
 
 #define USB_VENDOR_8BITDO       0x2dc8
 #define USB_VENDOR_AMAZON       0x1949
+#define USB_VENDOR_ANDGAMER     0x38d2
 #define USB_VENDOR_APPLE        0x05ac
 #define USB_VENDOR_ASTRO        0x9886
 #define USB_VENDOR_ASUS         0x0b05
@@ -212,6 +213,7 @@
 #define USB_PRODUCT_ZUIKI_EVOTOP_PC_DINPUT                0X001d
 #define USB_PRODUCT_ZUIKI_EVOTOP_PC_BT                    0X0017
 #define USB_PRODUCT_VOIDGAMING_PS4FIREBIRD                0x10e5
+#define USB_PRODUCT_VOIDGAMING_GENESIS_SINPUT             0x1014
 
 // USB usage pages
 #define USB_USAGEPAGE_GENERIC_DESKTOP 0x0001