sdlGetGamepadButtonLabelForType function gamepad

int sdlGetGamepadButtonLabelForType(
  1. int type,
  2. int button
)

Get the label of a button on a gamepad.

\param type the type of gamepad to check. \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_GetGamepadButtonLabel

extern SDL_DECLSPEC SDL_GamepadButtonLabel SDLCALL SDL_GetGamepadButtonLabelForType(SDL_GamepadType type, SDL_GamepadButton button)

Implementation

int sdlGetGamepadButtonLabelForType(int type, int button) {
  final sdlGetGamepadButtonLabelForTypeLookupFunction = _libSdl
      .lookupFunction<
        Int32 Function(Int32 type, Int32 button),
        int Function(int type, int button)
      >('SDL_GetGamepadButtonLabelForType');
  return sdlGetGamepadButtonLabelForTypeLookupFunction(type, button);
}