![]() |
libdragon
|
Joypad Subsystem. More...
Go to the source code of this file.
Data Structures | |
| union | joypad_buttons_t |
| Joypad Buttons. More... | |
| struct | joypad_inputs_t |
| Joypad Inputs Unified State Structure. More... | |
Macros | |
| #define | JOYPAD_PORT_COUNT 4 |
| Count of Joypad ports. | |
| #define | JOYPAD_PORT_FOREACH(iterator_token) |
| Convenience macro to iterate through all Joypad ports. | |
Joybus analog value ranges | |
| #define | JOYPAD_RANGE_N64_STICK_MAX 90 |
| Maximum range of a Nintendo 64 controller analog stick. | |
| #define | JOYPAD_RANGE_GCN_STICK_MAX 100 |
| Maximum range of a GameCube controller analog stick. | |
| #define | JOYPAD_RANGE_GCN_CSTICK_MAX 76 |
| Maximum range of a GameCube controller analog C-stick. | |
| #define | JOYPAD_RANGE_GCN_TRIGGER_MAX 200 |
| Maximum range of a GameCube controller analog trigger. | |
Functions | |
| void | joypad_init (void) |
| Initialize the Joypad subsystem. | |
| void | joypad_close (void) |
| Close the Joypad subsystem. | |
| void | joypad_poll (void) |
| Fetch the current Joypad input state. | |
| bool | joypad_is_connected (joypad_port_t port) |
| Whether a Joybus device is plugged in to a Joypad port. | |
| joybus_identifier_t | joypad_get_identifier (joypad_port_t port) |
| Get the Joybus device identifier for a Joypad port. | |
| joypad_style_t | joypad_get_style (joypad_port_t port) |
| Get the Joypad style for a Joypad port. | |
| joypad_accessory_type_t | joypad_get_accessory_type (joypad_port_t port) |
| Get the Joypad accessory type for a Joypad port. | |
| bool | joypad_get_rumble_supported (joypad_port_t port) |
| Is rumble supported for a Joypad port? | |
| bool | joypad_get_rumble_active (joypad_port_t port) |
| Is rumble active for a Joypad port? | |
| void | joypad_set_rumble_active (joypad_port_t port, bool active) |
| Activate or deactivate rumble on a Joypad port. | |
| joypad_inputs_t | joypad_get_inputs (joypad_port_t port) |
| Get the current Joypad inputs state for a Joypad port. | |
| joypad_buttons_t | joypad_get_buttons (joypad_port_t port) |
| Get the current Joypad buttons state for a Joypad port. | |
| joypad_buttons_t | joypad_get_buttons_pressed (joypad_port_t port) |
| Get the Joypad buttons that were pressed since the last time Joypads were read for a Joypad port. | |
| joypad_buttons_t | joypad_get_buttons_released (joypad_port_t port) |
| Get the Joypad buttons that were released since the last time Joypads were read for a Joypad port. | |
| joypad_buttons_t | joypad_get_buttons_held (joypad_port_t port) |
| Get the Joypad buttons that are held down since the last time Joypads were read for a Joypad port. | |
| joypad_8way_t | joypad_get_direction (joypad_port_t port, joypad_2d_t axes) |
| Get the 8-way direction for a Joypad port's directional axes. | |
| int | joypad_get_axis_pressed (joypad_port_t port, joypad_axis_t axis) |
| Get the direction of a "press" of an axis on a Joypad port. | |
| int | joypad_get_axis_released (joypad_port_t port, joypad_axis_t axis) |
| Get the direction of a "release" of an axis on a Joypad port. | |
| int | joypad_get_axis_held (joypad_port_t port, joypad_axis_t axis) |
| Get the direction that an axis is held on a Joypad port. | |
Joypad Subsystem.