Refactor menu_iterate_main
This commit is contained in:
parent
3f978b2b1e
commit
6bbc2dd83d
|
@ -100,7 +100,7 @@ bool menu_load_content(enum rarch_core_type type)
|
|||
if (disp)
|
||||
disp->msg_force = true;
|
||||
|
||||
menu_entry_iterate(MENU_ACTION_NOOP);
|
||||
menu_iterate_main(MENU_ACTION_NOOP);
|
||||
|
||||
menu_display_fb();
|
||||
|
||||
|
@ -360,7 +360,7 @@ int menu_iterate(retro_input_t input,
|
|||
|
||||
action = menu_input->joypad.state;
|
||||
|
||||
ret = menu_entry_iterate(action);
|
||||
ret = menu_iterate_main(action);
|
||||
|
||||
if (menu_driver_alive() && !rarch_main_is_idle())
|
||||
menu_display_fb();
|
||||
|
|
|
@ -177,8 +177,7 @@ void *menu_init(const void *data);
|
|||
int menu_iterate(retro_input_t input,
|
||||
retro_input_t old_input, retro_input_t trigger_input);
|
||||
|
||||
int menu_iterate_main(const char *label,
|
||||
unsigned action);
|
||||
int menu_iterate_main(unsigned action);
|
||||
|
||||
/**
|
||||
* menu_free:
|
||||
|
|
|
@ -358,19 +358,6 @@ int menu_entry_select(uint32_t i)
|
|||
return menu_entry_action(&entry, i, MENU_ACTION_SELECT);
|
||||
}
|
||||
|
||||
int menu_entry_iterate(unsigned action)
|
||||
{
|
||||
const char *label = NULL;
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
|
||||
if (!menu_list)
|
||||
return -1;
|
||||
|
||||
menu_list_get_last_stack(menu_list, NULL, &label, NULL, NULL);
|
||||
|
||||
return menu_iterate_main(label, action);
|
||||
}
|
||||
|
||||
int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
|
||||
{
|
||||
int ret = 0;
|
||||
|
|
|
@ -108,8 +108,6 @@ bool menu_entry_is_currently_selected(unsigned id);
|
|||
void menu_entry_get(menu_entry_t *entry, size_t i,
|
||||
void *userdata, bool use_representation);
|
||||
|
||||
int menu_entry_iterate(unsigned action);
|
||||
|
||||
int menu_entry_select(uint32_t i);
|
||||
|
||||
int menu_entry_action(menu_entry_t *entry,
|
||||
|
|
|
@ -412,27 +412,32 @@ static enum action_iterate_type action_iterate_type(uint32_t hash)
|
|||
return ITERATE_TYPE_DEFAULT;
|
||||
}
|
||||
|
||||
int menu_iterate_main(const char *label, unsigned action)
|
||||
int menu_iterate_main(unsigned action)
|
||||
{
|
||||
menu_entry_t entry;
|
||||
char msg[PATH_MAX_LENGTH] = {0};
|
||||
enum action_iterate_type iterate_type;
|
||||
size_t selected;
|
||||
size_t *pop_selected = NULL;
|
||||
const char *label = NULL;
|
||||
bool fb_is_dirty = false;
|
||||
bool do_messagebox = false;
|
||||
bool do_pop_stack = false;
|
||||
bool do_post_iterate = false;
|
||||
bool do_render = false;
|
||||
int ret = 0;
|
||||
uint32_t hash = 0;
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
menu_navigation_t *nav = menu_navigation_get_ptr();
|
||||
menu_display_t *disp = menu_display_get_ptr();
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
uint32_t hash = menu_hash_calculate(label);
|
||||
|
||||
menu_list_get_last_stack(menu_list, NULL, &label, NULL, NULL);
|
||||
if (!menu || !menu_list)
|
||||
return 0;
|
||||
|
||||
hash = menu_hash_calculate(label);
|
||||
|
||||
iterate_type = action_iterate_type(hash);
|
||||
|
||||
|
|
Loading…
Reference in New Issue