sdlGameControllerMappingForIndex function

Pointer<Int8> sdlGameControllerMappingForIndex(
  1. int mappingIndex
)

Get the mapping at a particular index.

\returns the mapping string. Must be freed with SDL_free(). Returns NULL if the index is out of range.

\since This function is available since SDL 2.0.6.

extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index)

Implementation

Pointer<Int8> sdlGameControllerMappingForIndex(int mappingIndex) {
  final sdlGameControllerMappingForIndexLookupFunction = libSdl2.lookupFunction<
      Pointer<Int8> Function(Int32 mappingIndex),
      Pointer<Int8> Function(
          int mappingIndex)>('SDL_GameControllerMappingForIndex');
  return sdlGameControllerMappingForIndexLookupFunction(mappingIndex);
}