---
name: "ALLEGRO_JOYSTICK_STATE"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ALLEGRO_JOYSTICK_STATE"
---

# ALLEGRO\_JOYSTICK\_STATE(3)

Allegro 5 API

## NAME

ALLEGRO\_JOYSTICK\_STATE - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  typedef struct ALLEGRO_JOYSTICK_STATE ALLEGRO_JOYSTICK_STATE;
  ```

## DESCRIPTION

This is a structure that is used to hold a “snapshot” of a joystick’s axes and buttons at a particular instant. All fields public and read-only.

-

  ```
  struct {
     float axis[num_axes];             // -1.0 to 1.0
  } stick[num_sticks];
  int button[num_buttons];             // 0 to 32767
  ```

## SEE ALSO

[al\_get\_joystick\_state(3)](/al_get_joystick_state/3.md)
