libtransistor
A userland library for the Nintendo Switch
|
Controller input data structures and functions. More...
#include <libtransistor/types.h>
Go to the source code of this file.
Data Structures | |
struct | hid_touch_data_entry_t |
struct | hid_touch_entry_t |
struct | hid_touchscreen_t |
struct | hid_mouse_t |
struct | hid_keyboard_t |
struct | hid_mac |
struct | hid_controller_state_entry_t |
struct | hid_controller_state_t |
struct | hid_controller_color_t |
struct | hid_controller_t |
struct | hid_shared_memory_t |
Enumerations | |
enum | hid_controller_button_mask_t { BUTTON_A = BIT(0), BUTTON_B = BIT(1), BUTTON_X = BIT(2), BUTTON_Y = BIT(3), BUTTON_LSTICK = BIT(4), BUTTON_RSTICK = BIT(5), BUTTON_L = BIT(6), BUTTON_R = BIT(7), BUTTON_ZL = BIT(8), BUTTON_ZR = BIT(9), BUTTON_PLUS = BIT(10), BUTTON_MINUS = BIT(11), BUTTON_LEFT = BIT(12), BUTTON_UP = BIT(13), BUTTON_RIGHT = BIT(14), BUTTON_DOWN = BIT(15), BUTTON_LSTICK_LEFT = BIT(16), BUTTON_LSTICK_UP = BIT(17), BUTTON_LSTICK_DOWN = BIT(18), BUTTON_LSTICK_RIGHT = BIT(19), BUTTON_RSTICK_LEFT = BIT(20), BUTTON_RSTICK_UP = BIT(21), BUTTON_RSTICK_DOWN = BIT(22), BUTTON_RSTICK_RIGHT = BIT(23), BUTTON_SL = BIT(24), BUTTON_SR = BIT(25) } |
Bitmasks for hid_controller_state_entry_t.button_state. | |
Functions | |
result_t | hid_init () |
Initialize input. | |
hid_shared_memory_t * | hid_get_shared_memory () |
Get HID shared memory. | |
bool | hid_controller_buttons_down (hid_controller_t *c, hid_controller_button_mask_t m) |
Detect if button(s) are pressed. | |
void | hid_finalize () |
Finalize HID. | |
Controller input data structures and functions.