mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Create menu_init_list and menu_free_list
This commit is contained in:
parent
5d558497af
commit
1fe95bdafb
3
driver.c
3
driver.c
@ -868,6 +868,8 @@ static void init_menu(void)
|
||||
RARCH_ERR("Cannot initialize menu.\n");
|
||||
rarch_fail(1, "init_menu()");
|
||||
}
|
||||
|
||||
menu_init_list(driver.menu);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1487,6 +1489,7 @@ void uninit_drivers(void)
|
||||
|
||||
if (!driver.menu_data_own)
|
||||
{
|
||||
menu_free_list(driver.menu);
|
||||
menu_free(driver.menu);
|
||||
driver.menu = NULL;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ bool load_menu_content(void)
|
||||
|
||||
void *menu_init(const void *data)
|
||||
{
|
||||
menu_handle_t *menu;
|
||||
menu_handle_t *menu = NULL;
|
||||
menu_ctx_driver_t *menu_ctx = (menu_ctx_driver_t*)data;
|
||||
|
||||
if (!menu_ctx)
|
||||
@ -156,13 +156,9 @@ void *menu_init(const void *data)
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
menu->shader = (struct gfx_shader*)calloc(1, sizeof(struct gfx_shader));
|
||||
#endif
|
||||
file_list_push(menu->menu_stack, "", "mainmenu", MENU_SETTINGS, 0);
|
||||
menu_clear_navigation(menu);
|
||||
menu->push_start_screen = g_settings.menu_show_start_screen;
|
||||
g_settings.menu_show_start_screen = false;
|
||||
|
||||
menu_entries_push_list(menu, menu->selection_buf,
|
||||
"", "mainmenu", 0);
|
||||
|
||||
menu->current_pad = 0;
|
||||
|
||||
@ -173,6 +169,24 @@ void *menu_init(const void *data)
|
||||
return menu;
|
||||
}
|
||||
|
||||
void menu_free_list(void *data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
}
|
||||
|
||||
void menu_init_list(void *data)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
file_list_push(menu->menu_stack, "", "mainmenu", MENU_SETTINGS, 0);
|
||||
menu_clear_navigation(menu);
|
||||
menu_entries_push_list(menu, menu->selection_buf,
|
||||
"", "mainmenu", 0);
|
||||
}
|
||||
|
||||
void menu_free(void *data)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
@ -137,6 +137,10 @@ typedef enum
|
||||
|
||||
void *menu_init(const void *data);
|
||||
|
||||
void menu_free_list(void *data);
|
||||
|
||||
void menu_init_list(void *data);
|
||||
|
||||
int menu_iterate(retro_input_t input,
|
||||
retro_input_t old_input, retro_input_t trigger_input);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user