---
name: "al_reconfigure_joysticks"
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/al_reconfigure_joysticks"
---

# al\_reconfigure\_joysticks(3)

Allegro 5 API

## NAME

al\_reconfigure\_joysticks - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  bool al_reconfigure_joysticks(void)
  ```

## DESCRIPTION

Allegro is able to cope with users connecting and disconnected joystick devices on-the-fly. On existing platforms, the joystick event source will generate an event of type `ALLEGRO_EVENT_JOYSTICK_CONFIGURATION` when a device is plugged in or unplugged. In response, you should call [al\_reconfigure\_joysticks(3)](/al_reconfigure_joysticks/3.md).

Afterwards, the number returned by [al\_get\_num\_joysticks(3)](/al_get_num_joysticks/3.md) may be different, and the handles returned by [al\_get\_joystick(3)](/al_get_joystick/3.md) may be different or be ordered differently.

All [ALLEGRO\_JOYSTICK(3)](/ALLEGRO_JOYSTICK/3.md) handles remain valid, but handles for disconnected devices become inactive: their states will no longer update, and [al\_get\_joystick(3)](/al_get_joystick/3.md) will not return the handle. Handles for devices which remain connected will continue to represent the same devices. Previously inactive handles may become active again, being reused to represent newly connected devices.

Returns true if the joystick configuration changed, otherwise returns false.

It is possible that on some systems, Allegro won’t be able to generate `ALLEGRO_EVENT_JOYSTICK_CONFIGURATION` events. If your game has an input configuration screen or similar, you may wish to call [al\_reconfigure\_joysticks(3)](/al_reconfigure_joysticks/3.md) when entering that screen.

## SEE ALSO

[al\_get\_joystick\_event\_source(3)](/al_get_joystick_event_source/3.md), [ALLEGRO\_EVENT(3)](/ALLEGRO_EVENT/3.md)
