---
name: "SDL_NumJoysticks"
section: "3"
platform: "linux"
package: "libsdl1.2-dev"
version: "1.2.15+dfsg2-8"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_NumJoysticks"
---

# SDL\_NumJoysticks(3)

Count available joysticks.

## NAME

SDL\_NumJoysticks - Count available joysticks.

## SYNOPSIS

**#include "SDL.h"**

**int SDL\_NumJoysticks**(**void**);

## DESCRIPTION

Counts the number of joysticks attached to the system.

## RETURN VALUE

Returns the number of attached joysticks

## SEE ALSO

**SDL\_JoystickName**, **SDL\_JoystickOpen**
