1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
.TH al_reconfigure_joysticks 3 "" "Allegro reference manual"
.SH NAME
.PP
al_reconfigure_joysticks \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>
bool\ al_reconfigure_joysticks(void)
\f[]
.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[C]ALLEGRO_EVENT_JOYSTICK_CONFIGURATION\f[] when a device is
plugged in or unplugged.
In response, you should call al_reconfigure_joysticks(3).
.PP
Afterwards, the number returned by al_get_num_joysticks(3) may be
different, and the handles returned by al_get_joystick(3) may be
different or be ordered differently.
.PP
All ALLEGRO_JOYSTICK(3) handles remain valid, but handles for
disconnected devices become inactive: their states will no longer
update, and al_get_joystick(3) 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\[aq]t be able to
generate \f[C]ALLEGRO_EVENT_JOYSTICK_CONFIGURATION\f[] events.
If your game has an input configuration screen or similar, you may wish
to call al_reconfigure_joysticks(3) when entering that screen.
.SH SEE ALSO
.PP
al_get_joystick_event_source(3), ALLEGRO_EVENT(3)
|