---
name: "SDL_GamepadConnected"
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_GamepadConnected"
---

# SDL\_GamepadConnected(3)

Check if a gamepad has been opened and is currently connected.

## NAME

SDL\_GamepadConnected - Check if a gamepad has been opened and is currently connected.

## HEADER FILE

Defined in SDL3/SDL\_gamepad.h

## SYNOPSIS

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

**bool SDL\_GamepadConnected(SDL\_Gamepad \*gamepad);**

## FUNCTION PARAMETERS

- *gamepad*

  a gamepad identifier previously returned by  **SDL\_OpenGamepad** ().

## RETURN VALUE

Returns true if the gamepad has been opened and is currently connected, or false if not.

## AVAILABILITY

This function is available since SDL 3.2.0.
