mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-07 09:11:08 +00:00
(Menu) Create menu_entries_pop
This commit is contained in:
parent
3ef89c64db
commit
5e88f487e9
@ -514,12 +514,6 @@ static void menu_common_setting_push_current_menu(file_list_t *list,
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_action_cancel(void)
|
||||
{
|
||||
file_list_pop(driver.menu->menu_stack, &driver.menu->selection_ptr);
|
||||
driver.menu->need_refresh = true;
|
||||
}
|
||||
|
||||
static int menu_common_core_setting_toggle(unsigned setting, unsigned action)
|
||||
{
|
||||
unsigned index = setting - MENU_SETTINGS_CORE_OPTION_START;
|
||||
@ -1340,8 +1334,7 @@ static int menu_settings_iterate(unsigned action)
|
||||
break;
|
||||
|
||||
case MENU_ACTION_CANCEL:
|
||||
if (file_list_get_size(driver.menu->menu_stack) > 1)
|
||||
menu_action_cancel();
|
||||
menu_entries_pop();
|
||||
break;
|
||||
case MENU_ACTION_SELECT:
|
||||
{
|
||||
@ -2057,8 +2050,7 @@ static int menu_common_iterate(unsigned action)
|
||||
break;
|
||||
|
||||
case MENU_ACTION_CANCEL:
|
||||
if (file_list_get_size(driver.menu->menu_stack) > 1)
|
||||
menu_action_cancel();
|
||||
menu_entries_pop();
|
||||
break;
|
||||
|
||||
case MENU_ACTION_OK:
|
||||
|
@ -69,6 +69,15 @@ void menu_entries_push_perfcounter(menu_handle_t *menu,
|
||||
id + i, 0);
|
||||
}
|
||||
|
||||
void menu_entries_pop(void)
|
||||
{
|
||||
if (file_list_get_size(driver.menu->menu_stack) > 1)
|
||||
{
|
||||
file_list_pop(driver.menu->menu_stack, &driver.menu->selection_ptr);
|
||||
driver.menu->need_refresh = true;
|
||||
}
|
||||
}
|
||||
|
||||
int menu_entries_push(menu_handle_t *menu,
|
||||
const char *path, const char *label,
|
||||
unsigned menu_type)
|
||||
@ -802,3 +811,4 @@ void menu_entries_push_info(void)
|
||||
{
|
||||
file_list_push(driver.menu->menu_stack, "", "help", 0, 0);
|
||||
}
|
||||
|
||||
|
@ -24,5 +24,6 @@ int menu_entries_push(menu_handle_t *menu, const char *path,
|
||||
void menu_entries_push_info(void);
|
||||
int menu_parse_check(unsigned menu_type);
|
||||
int menu_parse_and_resolve(void);
|
||||
void menu_entries_pop(void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user