diff --git a/frontend/menu/menu_common.h b/frontend/menu/menu_common.h index 903fb25848..3cc7dcbc47 100644 --- a/frontend/menu/menu_common.h +++ b/frontend/menu/menu_common.h @@ -92,9 +92,9 @@ typedef enum MENU_ACTION_NOOP } menu_action_t; -void menu_poll_bind_get_rested_axes(void *data); -void menu_poll_bind_state(void *data); -bool menu_poll_find_trigger(void *data1, void *data2); +void menu_poll_bind_get_rested_axes(struct menu_bind_state *state); +void menu_poll_bind_state(struct menu_bind_state *state); +bool menu_poll_find_trigger(struct menu_bind_state *state, struct menu_bind_state *new_state); bool menu_custom_bind_keyboard_cb(void *data, unsigned code); void *menu_init(const void *data); diff --git a/frontend/menu/menu_input_line_cb.c b/frontend/menu/menu_input_line_cb.c index becddc7cd7..11651846b0 100644 --- a/frontend/menu/menu_input_line_cb.c +++ b/frontend/menu/menu_input_line_cb.c @@ -142,10 +142,8 @@ void menu_key_event(bool down, unsigned keycode, uint32_t character, uint16_t mo } } -void menu_poll_bind_state(void *data) +void menu_poll_bind_state(struct menu_bind_state *state) { - struct menu_bind_state *state = (struct menu_bind_state*)data; - if (!state) return; @@ -180,11 +178,10 @@ void menu_poll_bind_state(void *data) } } -void menu_poll_bind_get_rested_axes(void *data) +void menu_poll_bind_get_rested_axes(struct menu_bind_state *state) { unsigned i, a; const rarch_joypad_driver_t *joypad = NULL; - struct menu_bind_state *state = (struct menu_bind_state*)data; if (!state) return; @@ -265,12 +262,9 @@ static bool menu_poll_find_trigger_pad(struct menu_bind_state *state, struct men return false; } -bool menu_poll_find_trigger(void *data1, void *data2) +bool menu_poll_find_trigger(struct menu_bind_state *state, struct menu_bind_state *new_state) { unsigned i; - struct menu_bind_state *state, *new_state; - state = (struct menu_bind_state*)data1; - new_state = (struct menu_bind_state*)data2; if (!state || !new_state) return false;