al_get_joystick_type(3) Library Functions Manual al_get_joystick_type(3)

al_get_joystick_type - Allegro 5 API

#include <allegro5/allegro.h>
ALLEGRO_JOYSTICK_TYPE al_get_joystick_type(ALLEGRO_JOYSTICK *joy)

Returns the joystick type. If the type is ALLEGRO_JOYSTICK_TYPE_GAMEPAD, then you can use the ALLEGRO_GAMEPAD_BUTTON(3) and ALLEGRO_GAMEPAD_STICK(3) to interpret the button/stick events and states more easily. Joystick types will typically be unknown unless al_set_joystick_mappings(3) is called first.

5.2.11

al_set_joystick_mappings(3), ALLEGRO_JOYSTICK_TYPE(3)

[Unstable API]: New API.

Allegro reference manual