Rename menu_entries_pop_list into menu_list_pop_stack

This commit is contained in:
twinaphex 2014-10-17 20:47:32 +02:00
parent 0e2c108a8a
commit 2de0775213
5 changed files with 24 additions and 24 deletions

View File

@ -42,7 +42,7 @@ static int menu_message_toggle(unsigned action)
driver.menu_ctx->render_messagebox(driver.menu->message_contents);
if (action == MENU_ACTION_OK)
menu_entries_pop_list(driver.menu->menu_stack);
menu_list_pop_stack(driver.menu->menu_stack);
return 0;
}
@ -95,7 +95,7 @@ static int menu_info_screen_iterate(unsigned action)
}
if (action == MENU_ACTION_OK)
menu_entries_pop_list(driver.menu->menu_stack);
menu_list_pop_stack(driver.menu->menu_stack);
return 0;
}
@ -181,7 +181,7 @@ static int menu_start_screen_iterate(unsigned action)
driver.menu_ctx->render_messagebox(msg);
if (action == MENU_ACTION_OK)
menu_entries_pop_list(driver.menu->menu_stack);
menu_list_pop_stack(driver.menu->menu_stack);
return 0;
}
@ -221,7 +221,7 @@ static int menu_settings_iterate(unsigned action,
case MENU_ACTION_CANCEL:
apply_deferred_settings();
menu_entries_pop_list(driver.menu->menu_stack);
menu_list_pop_stack(driver.menu->menu_stack);
break;
case MENU_ACTION_SELECT:
menu_list_push_stack(driver.menu->menu_stack, "", "info_screen",
@ -350,7 +350,7 @@ static int menu_viewport_iterate(unsigned action)
break;
case MENU_ACTION_CANCEL:
menu_entries_pop_list(driver.menu->menu_stack);
menu_list_pop_stack(driver.menu->menu_stack);
if (!strcmp(label, "custom_viewport_2"))
{
menu_list_push_stack(driver.menu->menu_stack, "", "",
@ -360,7 +360,7 @@ static int menu_viewport_iterate(unsigned action)
break;
case MENU_ACTION_OK:
menu_entries_pop_list(driver.menu->menu_stack);
menu_list_pop_stack(driver.menu->menu_stack);
if (type == MENU_SETTINGS_CUSTOM_VIEWPORT
&& !g_settings.video.scale_integer)
{
@ -484,7 +484,7 @@ static int menu_load_or_open_zip_iterate(unsigned action)
{
case MENU_ACTION_OK:
case MENU_ACTION_CANCEL:
menu_entries_pop_list(driver.menu->menu_stack);
menu_list_pop_stack(driver.menu->menu_stack);
file_list_get_last(driver.menu->menu_stack, &menu_path, &menu_label,
NULL);
@ -564,13 +564,13 @@ static int menu_common_iterate(unsigned action)
else if (type == MENU_SETTINGS_CUSTOM_BIND)
{
if (menu_input_bind_iterate(driver.menu))
menu_entries_pop_list(driver.menu->menu_stack);
menu_list_pop_stack(driver.menu->menu_stack);
return 0;
}
else if (type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD)
{
if (menu_input_bind_iterate_keyboard(driver.menu))
menu_entries_pop_list(driver.menu->menu_stack);
menu_list_pop_stack(driver.menu->menu_stack);
return 0;
}
@ -625,7 +625,7 @@ static int menu_common_iterate(unsigned action)
break;
case MENU_ACTION_CANCEL:
menu_entries_pop_list(driver.menu->menu_stack);
menu_list_pop_stack(driver.menu->menu_stack);
break;
case MENU_ACTION_OK:

View File

@ -100,18 +100,6 @@ void menu_build_scroll_indices(file_list_t *list)
list->size - 1;
}
void menu_entries_pop_list(file_list_t *list)
{
if (!list)
return;
if (file_list_get_size(list) > 1)
{
menu_list_pop(list, &driver.menu->selection_ptr);
driver.menu->need_refresh = true;
}
}
int setting_set_flags(rarch_setting_t *setting)
{
if (!setting)

View File

@ -34,8 +34,6 @@ int menu_entries_parse_list(file_list_t *list, file_list_t *menu_list,
const char *dir, const char *label, unsigned type,
unsigned default_type_plain, const char *exts);
void menu_entries_pop_list(file_list_t *list);
int menu_entries_deferred_push(file_list_t *list, file_list_t *menu_list);
void menu_entries_pop_stack(file_list_t *list, const char *needle);

View File

@ -37,6 +37,18 @@ end:
file_list_free(list);
}
void menu_list_pop_stack(file_list_t *list)
{
if (!list)
return;
if (file_list_get_size(list) > 1)
{
menu_list_pop(list, &driver.menu->selection_ptr);
driver.menu->need_refresh = true;
}
}
void menu_list_pop(file_list_t *list, size_t *directory_ptr)
{
if (!driver.menu_ctx)

View File

@ -27,6 +27,8 @@ void menu_list_free(file_list_t *list);
void menu_list_pop(file_list_t *list, size_t *directory_ptr);
void menu_list_pop_stack(file_list_t *list);
void menu_list_clear(file_list_t *list);
void menu_list_push(file_list_t *list,