sdlGetGamepadAppleSfSymbolsNameForButton function
Return the sfSymbolsName for a given button on a gamepad on Apple platforms.
\param gamepad the gamepad to query. \param button a button on the gamepad. \returns the sfSymbolsName or NULL if the name can't be found.
\since This function is available since SDL 3.1.3.
\sa SDL_GetGamepadAppleSFSymbolsNameForAxis
extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadAppleSFSymbolsNameForButton(SDL_Gamepad *gamepad, SDL_GamepadButton button)
Implementation
String? sdlGetGamepadAppleSfSymbolsNameForButton(
Pointer<SdlGamepad> gamepad, int button) {
final sdlGetGamepadAppleSfSymbolsNameForButtonLookupFunction =
libSdl3.lookupFunction<
Pointer<Utf8> Function(Pointer<SdlGamepad> gamepad, Int32 button),
Pointer<Utf8> Function(Pointer<SdlGamepad> gamepad,
int button)>('SDL_GetGamepadAppleSFSymbolsNameForButton');
final result =
sdlGetGamepadAppleSfSymbolsNameForButtonLookupFunction(gamepad, button);
if (result == nullptr) {
return null;
}
return result.toDartString();
}