getButtonLabel method

int getButtonLabel(
  1. 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.

\since This function is available since SDL 3.1.3.

\sa SDL_GetGamepadButtonLabelForType

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

Implementation

int getButtonLabel(int button) {
  return sdlGetGamepadButtonLabel(this, button);
}