sdlGetGamepadMappingForGuid function gamepad

Pointer<Int8> sdlGetGamepadMappingForGuid(
  1. SdlGuid guid
)

Get the gamepad mapping string for a given GUID.

\param guid a structure containing the GUID for which a mapping is desired. \returns a mapping string or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

\sa SDL_GetJoystickGUIDForID \sa SDL_GetJoystickGUID

extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_GUID guid)

Implementation

Pointer<Int8> sdlGetGamepadMappingForGuid(SdlGuid guid) {
  final sdlGetGamepadMappingForGuidLookupFunction = _libSdl
      .lookupFunction<
        Pointer<Int8> Function(SdlGuid guid),
        Pointer<Int8> Function(SdlGuid guid)
      >('SDL_GetGamepadMappingForGUID');
  return sdlGetGamepadMappingForGuidLookupFunction(guid);
}