add PowerA Enhanced controller

This commit is contained in:
wiredopposite
2024-04-19 17:07:27 -06:00
parent 2c601723f1
commit e3acca6d5c
4 changed files with 7 additions and 9 deletions

View File

@@ -7,10 +7,6 @@
// OGXM_PI_PICO
// OGXM_ADA_FEATHER_USBH
// OGXM_RPZERO_INTERPOSER
// OGXW_RETAIL_1CH
// OGXW_RPZERO_1CH
// OGXW_RPZERO_2CH
// OGXW_LITE
#define USBD_BOARD OGXM_RPZERO_INTERPOSER
#define USBD_MAX_GAMEPADS 1 // This is set by idf.py menuconfig for wireless boards, number here is ignored in that case.

View File

@@ -10,6 +10,7 @@
const usb_vid_pid_t switch_wired_devices[] =
{
{0x20D6, 0xA719}, // PowerA wired
{0x20D6, 0xA713}, // PowerA Enhanced wired
{0x0F0D, 0x0092} // Hori Pokken wired, I don't have this one so not 100% on if it'll work
};

View File

@@ -138,17 +138,18 @@ void unmount_gamepad(uint8_t dev_addr, uint8_t instance)
}
}
int free_slots = 0;
bool all_free = true;
for (int i = 0; i < MAX_GAMEPADS; i++)
{
if (!hosted_device[i].gamepad_driver)
if (hosted_device[i].gamepad_driver != nullptr)
{
free_slots++;
all_free = false;
break;
}
}
if (free_slots == MAX_GAMEPADS)
if (all_free)
{
led_mounted_indicator(false);
}