mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-30 16:37:39 +00:00
Added support for the PowerA Fusion Pro Wireless Controller in Bluetooth mode
This controller shows up with a VID/PID of 0, but has full functionality over Bluetooth
This commit is contained in:
parent
0f4b15e16b
commit
cdfc0c5a33
5 changed files with 26 additions and 13 deletions
|
@ -1176,17 +1176,18 @@ static void UpdateDeviceIdentity(SDL_HIDAPI_Device *device)
|
|||
switch (ctx->m_eControllerType) {
|
||||
case k_eSwitchDeviceInfoControllerType_JoyConLeft:
|
||||
HIDAPI_SetDeviceName(device, "Nintendo Switch Joy-Con (L)");
|
||||
HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT);
|
||||
HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT);
|
||||
device->type = SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT;
|
||||
break;
|
||||
case k_eSwitchDeviceInfoControllerType_JoyConRight:
|
||||
HIDAPI_SetDeviceName(device, "Nintendo Switch Joy-Con (R)");
|
||||
HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT);
|
||||
HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT);
|
||||
device->type = SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT;
|
||||
break;
|
||||
case k_eSwitchDeviceInfoControllerType_ProController:
|
||||
case k_eSwitchDeviceInfoControllerType_LicProController:
|
||||
HIDAPI_SetDeviceName(device, "Nintendo Switch Pro Controller");
|
||||
HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_SWITCH_PRO);
|
||||
HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SWITCH_PRO);
|
||||
device->type = SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO;
|
||||
break;
|
||||
case k_eSwitchDeviceInfoControllerType_NESLeft:
|
||||
|
@ -1199,17 +1200,17 @@ static void UpdateDeviceIdentity(SDL_HIDAPI_Device *device)
|
|||
break;
|
||||
case k_eSwitchDeviceInfoControllerType_SNES:
|
||||
HIDAPI_SetDeviceName(device, "Nintendo SNES Controller");
|
||||
HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_SNES_CONTROLLER);
|
||||
HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SNES_CONTROLLER);
|
||||
device->type = SDL_GAMEPAD_TYPE_UNKNOWN;
|
||||
break;
|
||||
case k_eSwitchDeviceInfoControllerType_N64:
|
||||
HIDAPI_SetDeviceName(device, "Nintendo N64 Controller");
|
||||
HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_N64_CONTROLLER);
|
||||
HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_N64_CONTROLLER);
|
||||
device->type = SDL_GAMEPAD_TYPE_UNKNOWN;
|
||||
break;
|
||||
case k_eSwitchDeviceInfoControllerType_SEGA_Genesis:
|
||||
HIDAPI_SetDeviceName(device, "Nintendo SEGA Genesis Controller");
|
||||
HIDAPI_SetDeviceProduct(device, USB_PRODUCT_NINTENDO_SEGA_GENESIS_CONTROLLER);
|
||||
HIDAPI_SetDeviceProduct(device, USB_VENDOR_NINTENDO, USB_PRODUCT_NINTENDO_SEGA_GENESIS_CONTROLLER);
|
||||
device->type = SDL_GAMEPAD_TYPE_UNKNOWN;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue