getMapping method

Pointer<Int8> getMapping()

Get the current mapping of a gamepad.

Details about mappings are discussed with SDL_AddGamepadMapping().

\param gamepad the gamepad you want to get the current mapping for. \returns a string that has the gamepad's mapping or NULL if no mapping is available; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.

\since This function is available since SDL 3.1.3.

\sa SDL_AddGamepadMapping \sa SDL_GetGamepadMappingForID \sa SDL_GetGamepadMappingForGUID \sa SDL_SetGamepadMapping

extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMapping(SDL_Gamepad *gamepad)

Implementation

Pointer<Int8> getMapping() {
  return sdlGetGamepadMapping(this);
}