sdlGetGamepadAppleSfSymbolsNameForAxis function

String? sdlGetGamepadAppleSfSymbolsNameForAxis(
  1. Pointer<SdlGamepad> gamepad,
  2. int axis
)

Return the sfSymbolsName for a given axis on a gamepad on Apple platforms.

\param gamepad the gamepad to query. \param axis an axis 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_GetGamepadAppleSFSymbolsNameForButton

extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadAppleSFSymbolsNameForAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis)

Implementation

String? sdlGetGamepadAppleSfSymbolsNameForAxis(
    Pointer<SdlGamepad> gamepad, int axis) {
  final sdlGetGamepadAppleSfSymbolsNameForAxisLookupFunction =
      libSdl3.lookupFunction<
          Pointer<Utf8> Function(Pointer<SdlGamepad> gamepad, Int32 axis),
          Pointer<Utf8> Function(Pointer<SdlGamepad> gamepad,
              int axis)>('SDL_GetGamepadAppleSFSymbolsNameForAxis');
  final result =
      sdlGetGamepadAppleSfSymbolsNameForAxisLookupFunction(gamepad, axis);
  if (result == nullptr) {
    return null;
  }
  return result.toDartString();
}