mirror of
https://github.com/yawut/SDL.git
synced 2026-04-24 23:37:09 -05:00
joystick/wiiu: Add player index support
This commit is contained in:
parent
26290a65a6
commit
f7568b7d97
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user