---
name: "num_joysticks"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/num_joysticks/3alleg4"
---

# num\_joysticks(3alleg4)

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**(3alleg4), **joy**(3alleg4), **exjoy**(3alleg4)
