diff options
| author | realtradam <[email protected]> | 2023-04-25 19:35:10 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-04-25 19:35:10 -0400 |
| commit | e5ad114afa00ed98908c3b3bacadf30c742cabd6 (patch) | |
| tree | 18aebb82716bc38436a9287e65970d6f37e88c97 /include/rodeo/input_t.h | |
| parent | 86a8351bf8318dc69ba89ac11d6f0b8baf70f7c1 (diff) | |
| download | RodeoKit-e5ad114afa00ed98908c3b3bacadf30c742cabd6.tar.gz RodeoKit-e5ad114afa00ed98908c3b3bacadf30c742cabd6.zip | |
added controller buttons to input system
Diffstat (limited to 'include/rodeo/input_t.h')
| -rw-r--r-- | include/rodeo/input_t.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/rodeo/input_t.h b/include/rodeo/input_t.h index cb3163e..0d57942 100644 --- a/include/rodeo/input_t.h +++ b/include/rodeo/input_t.h @@ -720,6 +720,8 @@ typedef enum } rodeo_input_binary_keycode_t; + + /** * \brief Enumeration of valid key mods (possibly OR'd together). */ @@ -761,6 +763,33 @@ enum } rodeo_input_binary_mouseButton_t; +typedef enum +{ + rodeo_input_binary_controllerButton_INVALID = -1, + rodeo_input_binary_controllerButton_A, + rodeo_input_binary_controllerButton_B, + rodeo_input_binary_controllerButton_X, + rodeo_input_binary_controllerButton_Y, + rodeo_input_binary_controllerButton_BACK, + rodeo_input_binary_controllerButton_GUIDE, + rodeo_input_binary_controllerButton_START, + rodeo_input_binary_controllerButton_LEFTSTICK, + rodeo_input_binary_controllerButton_RIGHTSTICK, + rodeo_input_binary_controllerButton_LEFTSHOULDER, + rodeo_input_binary_controllerButton_RIGHTSHOULDER, + rodeo_input_binary_controllerButton_DPAD_UP, + rodeo_input_binary_controllerButton_DPAD_DOWN, + rodeo_input_binary_controllerButton_DPAD_LEFT, + rodeo_input_binary_controllerButton_DPAD_RIGHT, + rodeo_input_binary_controllerButton_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */ + rodeo_input_binary_controllerButton_PADDLE1, /* Xbox Elite paddle P1 (upper left, facing the back) */ + rodeo_input_binary_controllerButton_PADDLE2, /* Xbox Elite paddle P3 (upper right, facing the back) */ + rodeo_input_binary_controllerButton_PADDLE3, /* Xbox Elite paddle P2 (lower left, facing the back) */ + rodeo_input_binary_controllerButton_PADDLE4, /* Xbox Elite paddle P4 (lower right, facing the back) */ + rodeo_input_binary_controllerButton_TOUCHPAD, /* PS4/PS5 touchpad button */ + rodeo_input_binary_controllerButton_MAX +} rodeo_input_binary_controllerButton_t; + // - SDL code end - typedef @@ -903,6 +932,10 @@ void* #define i_tag input_unboundedRange_mouse #include <stc/cset.h> +#define i_val rodeo_input_binary_controllerButton_t +#define i_tag input_binary_controllerButton +#include <stc/cset.h> + typedef struct { @@ -914,6 +947,7 @@ struct { cset_input_binary_scancodes scancodes; cset_input_binary_mouseButtons mouse_buttons; + cset_input_binary_controllerButton controller_buttons; } binary; |
