mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
Added an API to iterate over game controller mappings
This commit is contained in:
@@ -135,6 +135,20 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw,
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);
|
||||
|
||||
/**
|
||||
* Get the number of mappings installed
|
||||
*
|
||||
* \return the number of mappings
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings();
|
||||
|
||||
/**
|
||||
* Get the mapping at a particular index.
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if the index is out of range.
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);
|
||||
|
||||
/**
|
||||
* Get a mapping string for a GUID
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user