(Menu) Refactor menu_entries_push

This commit is contained in:
twinaphex 2014-08-31 19:41:28 +02:00
parent c5a98467be
commit e649ae80ed
4 changed files with 13 additions and 6 deletions

View File

@ -1483,7 +1483,9 @@ static int menu_settings_iterate(unsigned action)
{
bool ret = (menu_common_type_is(menu_type) == MENU_SETTINGS);
driver.menu->need_refresh = false;
menu_entries_push(driver.menu, label, ret ? menu_type : MENU_SETTINGS);
RARCH_LOG("Goes here?\n");
menu_entries_push(driver.menu, path, label,
ret ? menu_type : MENU_SETTINGS);
}
if (driver.menu_ctx && driver.menu_ctx->render)
@ -1888,7 +1890,7 @@ static void menu_parse_and_resolve(unsigned menu_type)
is_dir ? menu_type : MENU_FILE_PLAIN, 0);
}
menu_entries_push(driver.menu, label, menu_type);
menu_entries_push(driver.menu, dir, label, menu_type);
string_list_free(list);
}
}

View File

@ -265,7 +265,7 @@ void *menu_init(const void *data)
menu->push_start_screen = g_settings.menu_show_start_screen;
g_settings.menu_show_start_screen = false;
menu_entries_push(menu, "mainmenu", MENU_SETTINGS);
menu_entries_push(menu, "", "mainmenu", 0);
menu->trigger_state = 0;
menu->old_input_state = 0;

View File

@ -40,13 +40,18 @@ static void add_setting_entry(menu_handle_t *menu, const char *label, unsigned i
}
void menu_entries_push(menu_handle_t *menu,
const char *label, unsigned menu_type)
const char *path, const char *label,
unsigned menu_type)
{
unsigned i;
char tmp[256];
rarch_setting_t *setting_data = (rarch_setting_t *)setting_data_get_list();
#if 0
RARCH_LOG("Label is: %s\n", label);
RARCH_LOG("Path is: %s\n", path);
RARCH_LOG("Menu type is: %d\n", menu_type);
#endif
if (!strcmp(label, "mainmenu"))
{

View File

@ -19,7 +19,7 @@
#include "menu_common.h"
void menu_entries_push(menu_handle_t *menu, const char *label,
unsigned menu_type);
void menu_entries_push(menu_handle_t *menu, const char *path,
const char *label, unsigned menu_type);
#endif