---
name: "SDL_GetGamepadButtonLabel"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetGamepadButtonLabel"
---

# SDL\_GetGamepadButtonLabel(3)

Get the label of a button on a gamepad.

## NAME

SDL\_GetGamepadButtonLabel - Get the label of a button on a gamepad.

## HEADER FILE

Defined in SDL3/SDL\_gamepad.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_GamepadButtonLabel SDL\_GetGamepadButtonLabel(SDL\_Gamepad \*gamepad, SDL\_GamepadButton button);**

## FUNCTION PARAMETERS

- *gamepad*

  a gamepad.

- *button*

  a button index (one of the  **SDL\_GamepadButton**\
    values).

## RETURN VALUE

( **SDL\_GamepadButtonLabel** ) Returns the

**SDL\_GamepadButtonLabel**\
  enum corresponding to the button label.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetGamepadButtonLabelForType**(3)](/SDL_GetGamepadButtonLabelForType/3.md)
