mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 19:21:03 +00:00
(Menu) Refactor MENU_ACTION_CANCEL
This commit is contained in:
parent
55c48e7e66
commit
9e616e35a2
@ -1179,6 +1179,12 @@ static void menu_common_setting_push_current_menu(file_list_t *list, const char
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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_settings_iterate(unsigned action, rarch_setting_t *setting)
|
static int menu_settings_iterate(unsigned action, rarch_setting_t *setting)
|
||||||
{
|
{
|
||||||
const char *label = NULL;
|
const char *label = NULL;
|
||||||
@ -1227,10 +1233,7 @@ static int menu_settings_iterate(unsigned action, rarch_setting_t *setting)
|
|||||||
|
|
||||||
case MENU_ACTION_CANCEL:
|
case MENU_ACTION_CANCEL:
|
||||||
if (file_list_get_size(driver.menu->menu_stack) > 1)
|
if (file_list_get_size(driver.menu->menu_stack) > 1)
|
||||||
{
|
menu_action_cancel();
|
||||||
file_list_pop(driver.menu->menu_stack, &driver.menu->selection_ptr);
|
|
||||||
driver.menu->need_refresh = true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MENU_ACTION_SELECT:
|
case MENU_ACTION_SELECT:
|
||||||
{
|
{
|
||||||
@ -2096,10 +2099,7 @@ static int menu_common_iterate(unsigned action)
|
|||||||
|
|
||||||
case MENU_ACTION_CANCEL:
|
case MENU_ACTION_CANCEL:
|
||||||
if (file_list_get_size(driver.menu->menu_stack) > 1)
|
if (file_list_get_size(driver.menu->menu_stack) > 1)
|
||||||
{
|
menu_action_cancel();
|
||||||
file_list_pop(driver.menu->menu_stack, &driver.menu->selection_ptr);
|
|
||||||
driver.menu->need_refresh = true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_ACTION_OK:
|
case MENU_ACTION_OK:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user