diff options
author | kdx <kikoodx@paranoici.org> | 2024-04-11 21:54:54 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2024-04-11 21:54:54 +0200 |
commit | d19711c99ec4279292801edb86a39c24fff35c02 (patch) | |
tree | 4c90d3ad78e07e75d8cca98bc09f35e14ed1c576 | |
parent | d3c64be44ac87a415fa33bfa17a4635b0c64e549 (diff) | |
download | input-d19711c99ec4279292801edb86a39c24fff35c02.tar.gz |
get binds
-rw-r--r-- | input.c | 9 | ||||
-rw-r--r-- | input.h | 1 |
2 files changed, 10 insertions, 0 deletions
@@ -143,6 +143,15 @@ input_bind_action_tzr(const char *tag, TZR_Event e) } } +InputBind * +input_get_binds(const char *tag) +{ + InputAction *action = _input_get_action(tag); + if (action == NULL) + panic("_input_get_action failed"); + return action->binds.next; +} + bool input_down(const char *tag) { @@ -62,6 +62,7 @@ void input_bind_action_mb(const char *tag, uint8_t mb); void input_bind_action_tzr(const char *tag, TZR_Event e); void input_bind_axis_gc(const char *tag, SDL_GameControllerAxis ax); void input_bind_axis_act(const char *tag, const char *l, const char *r); +InputBind *input_get_binds(const char *tag); bool input_down(const char *tag); bool input_up(const char *tag); |