---
name: "SDL_GetGamepadStringForAxis"
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_GetGamepadStringForAxis"
---

# SDL\_GetGamepadStringForAxis(3)

Convert from an SDL\_GamepadAxis enum to a string.

## NAME

SDL\_GetGamepadStringForAxis - Convert from an  **SDL\_GamepadAxis**\
  enum to a string.

## HEADER FILE

Defined in SDL3/SDL\_gamepad.h

## SYNOPSIS

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

**const char \* SDL\_GetGamepadStringForAxis(SDL\_GamepadAxis axis);**

## FUNCTION PARAMETERS

- *axis*

  an enum value for a given  **SDL\_GamepadAxis** .

## RETURN VALUE

Returns a string for the given axis, or NULL if an invalid axis is specified. The string returned is of the format used by

**SDL\_Gamepad**\
  mapping strings.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetGamepadAxisFromString**(3)](/SDL_GetGamepadAxisFromString/3.md)
