sdlGetGamepadMappingForId function
Get the mapping of a gamepad.
This can be called before any gamepads are opened.
\param instance_id the joystick instance ID. \returns the mapping string. Returns NULL if no mapping is available. 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_GetGamepads \sa SDL_GetGamepadMapping
extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForID(SDL_JoystickID instance_id)
Implementation
Pointer<Int8> sdlGetGamepadMappingForId(int instanceId) {
final sdlGetGamepadMappingForIdLookupFunction = libSdl3.lookupFunction<
Pointer<Int8> Function(Uint32 instanceId),
Pointer<Int8> Function(int instanceId)>('SDL_GetGamepadMappingForID');
return sdlGetGamepadMappingForIdLookupFunction(instanceId);
}