Allegro 5 api
#include <allegro5/allegro.h> int al_get_joystick_num_sticks(ALLEGRO_JOYSTICK *joy)
Return the number of "sticks" on the given joystick. A stick has one or more axes.
al_get_joystick_num_axes(3alleg5), al_get_joystick_num_buttons(3alleg5)