Generalized the XInput user index into a player index

This commit is contained in:
Sam Lantinga 2018-10-25 16:53:14 -07:00
parent 545febcf21
commit 14329256cb
18 changed files with 138 additions and 18 deletions

View file

@ -932,6 +932,12 @@ HIDAPI_JoystickGetDeviceName(int device_index)
return HIDAPI_GetJoystickByIndex(device_index)->name;
}
static int
HIDAPI_JoystickGetDevicePlayerIndex(int device_index)
{
return -1;
}
static SDL_JoystickGUID
HIDAPI_JoystickGetDeviceGUID(int device_index)
{
@ -1048,6 +1054,7 @@ SDL_JoystickDriver SDL_HIDAPI_JoystickDriver =
HIDAPI_JoystickGetCount,
HIDAPI_JoystickDetect,
HIDAPI_JoystickGetDeviceName,
HIDAPI_JoystickGetDevicePlayerIndex,
HIDAPI_JoystickGetDeviceGUID,
HIDAPI_JoystickGetDeviceInstanceID,
HIDAPI_JoystickOpen,