From bbc5bc9f6eb2b2e77362391c8e00f2103acea676 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Mon, 28 Sep 2015 06:10:42 +0200 Subject: [PATCH] Circular header dependencies are the pits --- menu/menu.h | 18 ------------------ menu/menu_input.c | 4 ++-- menu/menu_input.h | 21 ++++++++++++++++++++- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/menu/menu.h b/menu/menu.h index 1032f45070..93620422fb 100644 --- a/menu/menu.h +++ b/menu/menu.h @@ -60,24 +60,6 @@ extern "C" { #endif -enum menu_action -{ - MENU_ACTION_NOOP = 0, - MENU_ACTION_UP, - MENU_ACTION_DOWN, - MENU_ACTION_LEFT, - MENU_ACTION_RIGHT, - MENU_ACTION_OK, - MENU_ACTION_SEARCH, - MENU_ACTION_SCAN, - MENU_ACTION_CANCEL, - MENU_ACTION_INFO, - MENU_ACTION_SELECT, - MENU_ACTION_START, - MENU_ACTION_SCROLL_DOWN, - MENU_ACTION_SCROLL_UP, - MENU_ACTION_TOGGLE -}; typedef enum { diff --git a/menu/menu_input.c b/menu/menu_input.c index 2e4020625f..26c1646b30 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -1204,10 +1204,10 @@ void menu_input_post_iterate(int *ret, unsigned action) *ret |= menu_input_pointer_post_iterate(cbs, &entry, action); } -enum menu_action menu_input_frame(retro_input_t input, retro_input_t trigger_input) +unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_input) { float delta_time; - enum menu_action ret = MENU_ACTION_NOOP; + unsigned ret = MENU_ACTION_NOOP; static bool initial_held = true; static bool first_held = false; static const retro_input_t input_repeat = diff --git a/menu/menu_input.h b/menu/menu_input.h index d89421e7f0..693c2c6e2d 100644 --- a/menu/menu_input.h +++ b/menu/menu_input.h @@ -24,6 +24,25 @@ #ifdef __cplusplus extern "C" { #endif + +enum menu_action +{ + MENU_ACTION_NOOP = 0, + MENU_ACTION_UP, + MENU_ACTION_DOWN, + MENU_ACTION_LEFT, + MENU_ACTION_RIGHT, + MENU_ACTION_OK, + MENU_ACTION_SEARCH, + MENU_ACTION_SCAN, + MENU_ACTION_CANCEL, + MENU_ACTION_INFO, + MENU_ACTION_SELECT, + MENU_ACTION_START, + MENU_ACTION_SCROLL_DOWN, + MENU_ACTION_SCROLL_UP, + MENU_ACTION_TOGGLE +}; enum menu_input_pointer_state { @@ -88,7 +107,7 @@ void menu_input_st_cheat_callback(void *userdata, const char *str); int menu_input_bind_iterate(char *s, size_t len); -enum menu_action menu_input_frame(retro_input_t input, retro_input_t trigger_state); +unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_state); void menu_input_post_iterate(int *ret, unsigned action);