---
name: "num_joysticks"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/num_joysticks"
---

# num\_joysticks(3alleg)

Global variable saying how many joysticks there are. Allegro game programming library.

## NAME

num\_joysticks - Global variable saying how many joysticks there are. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**extern int num\_joysticks;**

## DESCRIPTION

Global variable containing the number of active joystick devices. The  current drivers support a maximum of eight controllers.

## SEE ALSO

[**install\_joystick**(3alleg)](/install_joystick/3alleg.md), [**joy**(3alleg)](/joy/3alleg.md), [**exjoy**(3alleg)](/exjoy/3alleg.md)
