Class SDL_GamepadButton

java.lang.Object
club.doki7.sdl3.enumtype.SDL_GamepadButton

public final class SDL_GamepadButton extends Object

The list of buttons available on a gamepad

For controllers that use a diamond pattern for the face buttons, the south/east/west/north buttons below correspond to the locations in the diamond pattern. For Xbox controllers, this would be A/B/X/Y, for Nintendo Switch controllers, this would be B/A/Y/X, for PlayStation controllers this would be Cross/Circle/Square/Triangle.

For controllers that don't use a diamond pattern for the face buttons, the south/east/west/north buttons indicate the buttons labeled A, B, C, D, or 1, 2, 3, 4, or for controllers that aren't labeled, they are the primary, secondary, etc. buttons.

The activate action is often the south button and the cancel action is often the east button, but in some regions this is reversed, so your game should allow remapping actions based on user preferences.

You can query the labels for the face buttons using SDL_GetGamepadButtonLabel()

Since: This enum is available since SDL 3.2.0.