---
name: "SDL_GetGamepadBindings"
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_GetGamepadBindings"
---

# SDL\_GetGamepadBindings(3)

Get the SDL joystick layer bindings for a gamepad.

## NAME

SDL\_GetGamepadBindings - Get the SDL joystick layer bindings for a gamepad.

## HEADER FILE

Defined in SDL3/SDL\_gamepad.h

## SYNOPSIS

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

**SDL\_GamepadBinding \*\* SDL\_GetGamepadBindings(SDL\_Gamepad \*gamepad, int \*count);**

## FUNCTION PARAMETERS

- *gamepad*

  a gamepad.

- *count*

  a pointer filled in with the number of bindings returned.

## RETURN VALUE

( **SDL\_GamepadBinding** *) Returns a NULL terminated* array of pointers to bindings or NULL on failure; call

**SDL\_GetError** () for more information. This is a single allocation that should be freed with  **SDL\_free** () when it is no longer needed.

## AVAILABILITY

This function is available since SDL 3.2.0.
