DOKK / manpages / debian 13 / libsdl3-doc / SDL_SetGamepadMapping.3.en
SDL_SetGamepadMapping(3) SDL3 FUNCTIONS SDL_SetGamepadMapping(3)

SDL_SetGamepadMapping - Set the current mapping of a joystick or gamepad.

Defined in SDL3/SDL_gamepad.h

#include "SDL3/SDL.h"
bool SDL_SetGamepadMapping(SDL_JoystickID instance_id, const char *mapping);

Details about mappings are discussed with

SDL_AddGamepadMapping ().

the joystick instance ID.
the mapping to use for this device, or NULL to clear the mapping.

Returns true on success or false on failure; call

SDL_GetError () for more information.

This function is available since SDL 3.2.0.

(3), SDL_AddGamepadMapping(3), (3), SDL_GetGamepadMapping(3)

SDL 3.2.10 Simple Directmedia Layer