---
name: "SDL_GetGamepadStringForType"
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_GetGamepadStringForType"
---

# SDL\_GetGamepadStringForType(3)

Convert from an SDL\_GamepadType enum to a string.

## NAME

SDL\_GetGamepadStringForType - Convert from an  **SDL\_GamepadType**\
  enum to a string.

## HEADER FILE

Defined in SDL3/SDL\_gamepad.h

## SYNOPSIS

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

**const char \* SDL\_GetGamepadStringForType(SDL\_GamepadType type);**

## FUNCTION PARAMETERS

- *type*

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

## RETURN VALUE

Returns a string for the given type, or NULL if an invalid type 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\_GetGamepadTypeFromString**(3)](/SDL_GetGamepadTypeFromString/3.md)
