sdlGetGamepadButtonLabel function gamepad

int sdlGetGamepadButtonLabel(
  1. Pointer<SdlGamepad> gamepad,
  2. int button
)

Get the label of a button on a gamepad.

\param gamepad a gamepad. \param button a button index (one of the SDL_GamepadButton values). \returns the SDL_GamepadButtonLabel enum corresponding to the button label.

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

\since This function is available since SDL 3.2.0.

\sa SDL_GetGamepadButtonLabelForType

extern SDL_DECLSPEC SDL_GamepadButtonLabel SDLCALL SDL_GetGamepadButtonLabel(SDL_Gamepad *gamepad, SDL_GamepadButton button)

Implementation

int sdlGetGamepadButtonLabel(Pointer<SdlGamepad> gamepad, int button) {
  final sdlGetGamepadButtonLabelLookupFunction = _libSdl
      .lookupFunction<
        Int32 Function(Pointer<SdlGamepad> gamepad, Int32 button),
        int Function(Pointer<SdlGamepad> gamepad, int button)
      >('SDL_GetGamepadButtonLabel');
  return sdlGetGamepadButtonLabelLookupFunction(gamepad, button);
}