From 6d971631dfc75ec9cef5aabb2ba1de3a564b175a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 27 Sep 2015 23:03:12 +0200 Subject: [PATCH] Change signature of some menu functions --- menu/menu.h | 21 ++++++++++++++++++++- menu/menu_input.h | 19 ------------------- menu/menu_iterate.c | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/menu/menu.h b/menu/menu.h index 70c6ea3763..1032f45070 100644 --- a/menu/menu.h +++ b/menu/menu.h @@ -60,6 +60,25 @@ 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 { MENU_FILE_NONE = 0, @@ -173,7 +192,7 @@ void *menu_init(const void *data); * * Returns: 0 on success, -1 if we need to quit out of the loop. **/ -int menu_iterate(bool render_this_frame, unsigned action); +int menu_iterate(bool render_this_frame, enum menu_action action); int menu_iterate_render(void); diff --git a/menu/menu_input.h b/menu/menu_input.h index 148ad1bb4d..d89421e7f0 100644 --- a/menu/menu_input.h +++ b/menu/menu_input.h @@ -25,25 +25,6 @@ extern "C" { #endif -enum menu_action -{ - 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, - MENU_ACTION_NOOP -}; - enum menu_input_pointer_state { MENU_POINTER_X_AXIS = 0, diff --git a/menu/menu_iterate.c b/menu/menu_iterate.c index 05b462d2f4..121661113d 100644 --- a/menu/menu_iterate.c +++ b/menu/menu_iterate.c @@ -214,7 +214,7 @@ static enum action_iterate_type action_iterate_type(uint32_t hash) * * Returns: 0 on success, -1 if we need to quit out of the loop. **/ -int menu_iterate(bool render_this_frame, unsigned action) +int menu_iterate(bool render_this_frame, enum menu_action action) { size_t selection; menu_entry_t entry;