Function SDL_GetGamepadMappingForID

pub unsafe extern "C" fn SDL_GetGamepadMappingForID(
    instance_id: u32,
) -> *mut i8
Available on crate feature dep_sdl3 only.
Expand description

Get the mapping of a gamepad.

This can be called before any gamepads are opened.

§Parameters

  • instance_id: the joystick instance ID.

§Return value

Returns the mapping string. Returns NULL if no mapping is available. This should be freed with SDL_free() when it is no longer needed.

§Availability

This function is available since SDL 3.2.0.

§See also