.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "al_reconfigure_joysticks" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_reconfigure_joysticks - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include bool al_reconfigure_joysticks(void) \f[R] .fi .SH DESCRIPTION .PP 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 \f[V]ALLEGRO_EVENT_JOYSTICK_CONFIGURATION\f[R] when a device is plugged in or unplugged. In response, you should call al_reconfigure_joysticks(3alleg5). .PP Afterwards, the number returned by al_get_num_joysticks(3alleg5) may be different, and the handles returned by al_get_joystick(3alleg5) may be different or be ordered differently. .PP All ALLEGRO_JOYSTICK(3alleg5) handles remain valid, but handles for disconnected devices become inactive: their states will no longer update, and al_get_joystick(3alleg5) 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. .PP Returns true if the joystick configuration changed, otherwise returns false. .PP It is possible that on some systems, Allegro won\[cq]t be able to generate \f[V]ALLEGRO_EVENT_JOYSTICK_CONFIGURATION\f[R] events. If your game has an input configuration screen or similar, you may wish to call al_reconfigure_joysticks(3alleg5) when entering that screen. .SH SEE ALSO .PP al_get_joystick_event_source(3alleg5), ALLEGRO_EVENT(3alleg5)