Added SDL_JoystickFromInstanceID() and SDL_GameControllerFromInstanceID().

This commit is contained in:
Ryan C. Gordon
2015-11-14 12:35:45 -05:00
parent 998a54f9c5
commit e6ad29aec8
9 changed files with 67 additions and 0 deletions

View File

@@ -171,6 +171,11 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_
*/
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
/**
* Return the SDL_GameController associated with an instance id.
*/
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
/**
* Return the name for this currently opened controller
*/

View File

@@ -106,6 +106,11 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
*/
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
/**
* Return the SDL_Joystick associated with an instance id.
*/
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid);
/**
* Return the name for this currently opened joystick.
* If no name can be found, this function returns NULL.