mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 01:38:27 +00:00
Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
This commit is contained in:
parent
9e651b6915
commit
a8ac588549
7 changed files with 58 additions and 22 deletions
|
@ -175,6 +175,14 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the mapping of a game controller.
|
||||
* This can be called before any controllers are opened.
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Open a game controller for use.
|
||||
* The index passed as an argument refers to the N'th game controller on the system.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue