Added support for the PowerA Nintendo Switch Fusion Arcade Stick

main
Sam Lantinga 2021-07-30 18:23:43 -07:00
parent b33f470901
commit 16010f7561
2 changed files with 39 additions and 0 deletions

View File

@ -2114,6 +2114,40 @@ static SDL_bool SDL_IsJoystickProductWheel(Uint32 vidpid)
return SDL_FALSE;
}
static SDL_bool SDL_IsJoystickProductArcadeStick(Uint32 vidpid)
{
static Uint32 arcadestick_joysticks[] = {
MAKE_VIDPID(0x0079, 0x181a), /* Venom Arcade Stick */
MAKE_VIDPID(0x0f0d, 0x006a), /* Real Arcade Pro 4 */
MAKE_VIDPID(0x0079, 0x181b), /* Venom Arcade Stick */
MAKE_VIDPID(0x0c12, 0x0ef6), /* Hitbox Arcade Stick */
MAKE_VIDPID(0x0f0d, 0x008a), /* HORI Real Arcade Pro 4 */
MAKE_VIDPID(0x0f0d, 0x0016), /* Hori Real Arcade Pro.EX */
MAKE_VIDPID(0x0f0d, 0x001b), /* Hori Real Arcade Pro VX */
MAKE_VIDPID(0x0f0d, 0x008c), /* Hori Real Arcade Pro 4 */
MAKE_VIDPID(0x1bad, 0xf03d), /* Street Fighter IV Arcade Stick TE - Chun Li */
MAKE_VIDPID(0x1bad, 0xf502), /* Hori Real Arcade Pro.VX SA */
MAKE_VIDPID(0x1bad, 0xf504), /* Hori Real Arcade Pro. EX */
MAKE_VIDPID(0x1bad, 0xf506), /* Hori Real Arcade Pro.EX Premium VLX */
MAKE_VIDPID(0x24c6, 0x5000), /* Razer Atrox Arcade Stick */
MAKE_VIDPID(0x24c6, 0x5501), /* Hori Real Arcade Pro VX-SA */
MAKE_VIDPID(0x24c6, 0x550e), /* Hori Real Arcade Pro V Kai 360 */
MAKE_VIDPID(0x0f0d, 0x0063), /* Hori Real Arcade Pro Hayabusa (USA) Xbox One */
MAKE_VIDPID(0x0f0d, 0x0078), /* Hori Real Arcade Pro V Kai Xbox One */
MAKE_VIDPID(0x1532, 0x0a00), /* Razer Atrox Arcade Stick */
MAKE_VIDPID(0x0f0d, 0x00aa), /* HORI Real Arcade Pro V Hayabusa in Switch Mode */
MAKE_VIDPID(0x20d6, 0xa715), /* PowerA Nintendo Switch Fusion Arcade Stick */
};
int i;
for (i = 0; i < SDL_arraysize(arcadestick_joysticks); ++i) {
if (vidpid == arcadestick_joysticks[i]) {
return SDL_TRUE;
}
}
return SDL_FALSE;
}
static SDL_bool SDL_IsJoystickProductFlightStick(Uint32 vidpid)
{
static Uint32 flightstick_joysticks[] = {
@ -2194,6 +2228,10 @@ static SDL_JoystickType SDL_GetJoystickGUIDType(SDL_JoystickGUID guid)
return SDL_JOYSTICK_TYPE_WHEEL;
}
if (SDL_IsJoystickProductArcadeStick(vidpid)) {
return SDL_JOYSTICK_TYPE_ARCADE_STICK;
}
if (SDL_IsJoystickProductFlightStick(vidpid)) {
return SDL_JOYSTICK_TYPE_FLIGHT_STICK;
}

View File

@ -587,6 +587,7 @@ static const ControllerDescription_t arrControllers[] = {
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa712 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Fight Pad
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa713 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Super Mario Controller
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa714 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Spectra Controller
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa715 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Arcade Stick
{ MAKE_CONTROLLER_ID( 0x20d6, 0xa716 ), k_eControllerType_SwitchInputOnlyController, NULL }, // PowerA Nintendo Switch Fusion Pro Controller
// Valve products