---
name: "SDL_GetGamepadType"
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_GetGamepadType"
---

# SDL\_GetGamepadType(3)

Get the type of an opened gamepad.

## NAME

SDL\_GetGamepadType - Get the type of an opened gamepad.

## HEADER FILE

Defined in SDL3/SDL\_gamepad.h

## SYNOPSIS

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

**SDL\_GamepadType SDL\_GetGamepadType(SDL\_Gamepad \*gamepad);**

## FUNCTION PARAMETERS

- *gamepad*

  the gamepad object to query.

## RETURN VALUE

( **SDL\_GamepadType** ) Returns the gamepad type, or

**SDL\_GAMEPAD\_TYPE\_UNKNOWN**\
  if it's not available.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetGamepadTypeForID**(3)](/SDL_GetGamepadTypeForID/3.md)
