mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Create menu_list_push_stack
This commit is contained in:
parent
687f593174
commit
0e2c108a8a
@ -23,6 +23,7 @@
|
||||
#include "../menu_common.h"
|
||||
#include "../../../settings_data.h"
|
||||
#include "menu_backend.h"
|
||||
#include "../menu_list.h"
|
||||
#include "../menu_entries.h"
|
||||
#include "../menu_entries_cbs.h"
|
||||
#include "../menu_input_line_cb.h"
|
||||
@ -223,7 +224,7 @@ static int menu_settings_iterate(unsigned action,
|
||||
menu_entries_pop_list(driver.menu->menu_stack);
|
||||
break;
|
||||
case MENU_ACTION_SELECT:
|
||||
menu_list_push(driver.menu->menu_stack, "", "info_screen",
|
||||
menu_list_push_stack(driver.menu->menu_stack, "", "info_screen",
|
||||
0, driver.menu->selection_ptr);
|
||||
break;
|
||||
case MENU_ACTION_OK:
|
||||
@ -268,7 +269,7 @@ static int menu_settings_iterate(unsigned action,
|
||||
/* Have to defer it so we let settings refresh. */
|
||||
if (driver.menu->push_start_screen)
|
||||
{
|
||||
menu_list_push(driver.menu->menu_stack, "", "help", 0, 0);
|
||||
menu_list_push_stack(driver.menu->menu_stack, "", "help", 0, 0);
|
||||
driver.menu->push_start_screen = false;
|
||||
}
|
||||
|
||||
@ -352,7 +353,7 @@ static int menu_viewport_iterate(unsigned action)
|
||||
menu_entries_pop_list(driver.menu->menu_stack);
|
||||
if (!strcmp(label, "custom_viewport_2"))
|
||||
{
|
||||
menu_list_push(driver.menu->menu_stack, "", "",
|
||||
menu_list_push_stack(driver.menu->menu_stack, "", "",
|
||||
MENU_SETTINGS_CUSTOM_VIEWPORT,
|
||||
driver.menu->selection_ptr);
|
||||
}
|
||||
@ -363,7 +364,7 @@ static int menu_viewport_iterate(unsigned action)
|
||||
if (type == MENU_SETTINGS_CUSTOM_VIEWPORT
|
||||
&& !g_settings.video.scale_integer)
|
||||
{
|
||||
menu_list_push(driver.menu->menu_stack, "",
|
||||
menu_list_push_stack(driver.menu->menu_stack, "",
|
||||
"custom_viewport_2", 0, driver.menu->selection_ptr);
|
||||
}
|
||||
break;
|
||||
@ -632,7 +633,7 @@ static int menu_common_iterate(unsigned action)
|
||||
break;
|
||||
|
||||
case MENU_ACTION_SELECT:
|
||||
menu_list_push(driver.menu->menu_stack, "", "info_screen",
|
||||
menu_list_push_stack(driver.menu->menu_stack, "", "info_screen",
|
||||
0, driver.menu->selection_ptr);
|
||||
break;
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "menu_common.h"
|
||||
#include "menu_input_line_cb.h"
|
||||
#include "menu_entries.h"
|
||||
#include "menu_list.h"
|
||||
#include "menu_shader.h"
|
||||
#include "../frontend.h"
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "menu_entries.h"
|
||||
#include "menu_action.h"
|
||||
#include "menu_list.h"
|
||||
#include "../../settings_data.h"
|
||||
#include "../../performance.h"
|
||||
|
||||
@ -483,7 +484,7 @@ bool menu_entries_init(menu_handle_t *menu)
|
||||
menu->list_mainmenu = setting_data_new(SL_FLAG_MAIN_MENU);
|
||||
menu->list_settings = setting_data_new(SL_FLAG_ALL_SETTINGS);
|
||||
|
||||
menu_list_push(menu->menu_stack, "", "Main Menu", MENU_SETTINGS, 0);
|
||||
menu_list_push_stack(menu->menu_stack, "", "Main Menu", MENU_SETTINGS, 0);
|
||||
menu_clear_navigation(menu, true);
|
||||
push_main_menu_list(menu, menu->selection_buf,
|
||||
"", "Main Menu", 0);
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "menu_entries_cbs.h"
|
||||
#include "menu_action.h"
|
||||
#include "menu_common.h"
|
||||
#include "menu_list.h"
|
||||
#include "menu_input_line_cb.h"
|
||||
#include "menu_entries.h"
|
||||
#include "menu_shader.h"
|
||||
|
@ -81,6 +81,7 @@ end:
|
||||
file_list_clear(list);
|
||||
}
|
||||
|
||||
|
||||
void menu_list_push(file_list_t *list,
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t directory_ptr)
|
||||
@ -99,3 +100,10 @@ void menu_list_push(file_list_t *list,
|
||||
driver.menu_ctx->backend->list_insert(list, path,
|
||||
label, type, list->size - 1);
|
||||
}
|
||||
|
||||
void menu_list_push_stack(file_list_t *list,
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t directory_ptr)
|
||||
{
|
||||
menu_list_push(list, path, label, type, directory_ptr);
|
||||
}
|
||||
|
@ -33,6 +33,10 @@ void menu_list_push(file_list_t *list,
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t directory_ptr);
|
||||
|
||||
void menu_list_push_stack(file_list_t *list,
|
||||
const char *path, const char *label,
|
||||
unsigned type, size_t directory_ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user