Scroll to navigation

al_get_joystick_type(3alleg5) al_get_joystick_type(3alleg5)

NAME

al_get_joystick_type - Allegro 5 API

SYNOPSIS

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

DESCRIPTION

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

SINCE

5.2.11

SEE ALSO

al_set_joystick_mappings(3alleg5), ALLEGRO_JOYSTICK_TYPE(3alleg5)

[Unstable API]: New API.

Allegro reference manual