joystick/wiiu: Add player index support

This commit is contained in:
Ash Logan 2019-11-21 13:01:12 +11:00
parent 26290a65a6
commit f7568b7d97

View File

@ -225,7 +225,16 @@ static const char *WIIU_JoystickGetDeviceName(int device_index)
/* Function to get the player index of a joystick */
static int WIIU_JoystickGetDevicePlayerIndex(int device_index)
{
return -1;
int wiiu_device = WIIU_GetDeviceForIndex(device_index);
switch (wiiu_device) {
case WIIU_DEVICE_GAMEPAD: { return 0; }
case WIIU_DEVICE_WPAD(1): { return 1; }
case WIIU_DEVICE_WPAD(2): { return 2; }
case WIIU_DEVICE_WPAD(3): { return 3; }
case WIIU_DEVICE_WPAD(4): { return 4; }
default: { return -1; }
}
}
/* Function to return the stable GUID for a plugged in device */