hidapi: Use GameCube adapter controller port for player index

The Nintendo USB GameCube adapter has four controller ports. Return
the port number as 0 to 3 from SDL_JoystickGetPlayerIndex() and
SDL_JoystickGetDevicePlayerIndex().
This commit is contained in:
Zack Middleton 2019-06-08 13:36:59 -07:00
parent d5cdd91525
commit 2b3540e8f2
7 changed files with 61 additions and 1 deletions

View file

@ -65,6 +65,8 @@ typedef struct _SDL_HIDAPI_DeviceDriver
SDL_bool (*UpdateDriver)(SDL_HIDAPI_DriverData *context,
int *num_joysticks);
int (*NumJoysticks)(SDL_HIDAPI_DriverData *context);
int (*PlayerIndexForIndex)(SDL_HIDAPI_DriverData *context,
int index);
SDL_JoystickID (*InstanceIDForIndex)(SDL_HIDAPI_DriverData *context,
int index);
SDL_bool (*OpenJoystick)(SDL_HIDAPI_DriverData *context,