(Menu) Refactor menu_list_get_last_stack
This commit is contained in:
parent
cef2de6a70
commit
c465d25859
|
@ -286,7 +286,7 @@ static int menu_viewport_iterate(unsigned action)
|
|||
rarch_viewport_t *custom = (rarch_viewport_t*)
|
||||
&g_extern.console.screen.viewports.custom_vp;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack, NULL, &label, &type);
|
||||
menu_list_get_last_stack(driver.menu->menu_list, NULL, &label, &type);
|
||||
|
||||
geom = (struct retro_game_geometry*)&g_extern.system.av_info.geometry;
|
||||
|
||||
|
@ -404,7 +404,7 @@ static int menu_viewport_iterate(unsigned action)
|
|||
break;
|
||||
}
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack, NULL, &label, &type);
|
||||
menu_list_get_last_stack(driver.menu->menu_list, NULL, &label, &type);
|
||||
|
||||
if (driver.video_data && driver.menu_ctx && driver.menu_ctx->render)
|
||||
driver.menu_ctx->render();
|
||||
|
@ -487,7 +487,7 @@ static int menu_load_or_open_zip_iterate(unsigned action)
|
|||
case MENU_ACTION_CANCEL:
|
||||
menu_list_pop_stack(driver.menu->menu_list);
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
&menu_path, &menu_label, NULL);
|
||||
|
||||
if (menu_list_get_size() == 0)
|
||||
|
@ -549,7 +549,7 @@ static int menu_common_iterate(unsigned action)
|
|||
menu_list_get_actiondata_at_offset(driver.menu->menu_list->selection_buf,
|
||||
driver.menu->selection_ptr);
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack, NULL, &label, &type);
|
||||
menu_list_get_last_stack(driver.menu->menu_list, NULL, &label, &type);
|
||||
|
||||
if (driver.video_data && driver.menu_ctx && driver.menu_ctx->set_texture)
|
||||
driver.menu_ctx->set_texture(driver.menu);
|
||||
|
|
|
@ -254,7 +254,7 @@ static void glui_frame(void)
|
|||
|
||||
glui_render_background(false);
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack, &dir, &label, &menu_type);
|
||||
menu_list_get_last_stack(driver.menu->menu_list, &dir, &label, &menu_type);
|
||||
|
||||
get_title(label, dir, menu_type, title, sizeof(title));
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ static void rgui_render(void)
|
|||
const char *dir = NULL;
|
||||
const char *label = NULL;
|
||||
unsigned menu_type = 0;
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
&dir, &label, &menu_type);
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -158,7 +158,7 @@ static void rmenu_render(void)
|
|||
const char *dir = NULL;
|
||||
const char *label = NULL;
|
||||
unsigned menu_type = 0;
|
||||
menu_list_get_last_stack(menu->menu_stack, &dir, &label, &menu_type);
|
||||
menu_list_get_last_stack(driver.menu->menu_list, &dir, &label, &menu_type);
|
||||
|
||||
get_title(label, dir, menu_type, title, sizeof(title));
|
||||
|
||||
|
|
|
@ -370,7 +370,7 @@ static void rmenu_xui_render(void)
|
|||
|
||||
rmenu_xui_render_background();
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_stack, &dir,
|
||||
menu_list_get_last_stack(driver.menu->menu_list, &dir,
|
||||
&label, &menu_type);
|
||||
|
||||
get_title(label, dir, menu_type,
|
||||
|
|
|
@ -455,7 +455,7 @@ static void xmb_frame(void)
|
|||
|
||||
xmb_render_background(false);
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack, &dir, &label, &menu_type);
|
||||
menu_list_get_last_stack(driver.menu->menu_list, &dir, &label, &menu_type);
|
||||
|
||||
get_title(label, dir, menu_type, xmb->title, sizeof(xmb->title));
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@ int menu_entries_parse_list(file_list_t *list, file_list_t *menu_list,
|
|||
|
||||
if (!strcmp(label, "core_list"))
|
||||
{
|
||||
menu_list_get_last_stack(menu_list, &dir, NULL, NULL);
|
||||
menu_list_get_last_stack(driver.menu->menu_list, &dir, NULL, NULL);
|
||||
list_size = file_list_get_size(list);
|
||||
|
||||
for (i = 0; i < list_size; i++)
|
||||
|
@ -383,7 +383,7 @@ int menu_entries_deferred_push(file_list_t *list, file_list_t *menu_list)
|
|||
const char *label = NULL;
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
|
||||
menu_list_get_last_stack(menu_list, &path, &label, &type);
|
||||
menu_list_get_last_stack(driver.menu->menu_list, &path, &label, &type);
|
||||
|
||||
if (!strcmp(label, "Main Menu"))
|
||||
return entries_push_main_menu_list(driver.menu, list, path, label, type);
|
||||
|
|
|
@ -197,7 +197,7 @@ static int action_ok_shader_pass_load(const char *path,
|
|||
(void)menu_path;
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack, &menu_path, NULL,
|
||||
menu_list_get_last_stack(driver.menu->menu_list, &menu_path, NULL,
|
||||
NULL);
|
||||
|
||||
fill_pathname_join(driver.menu->shader->pass[hack_shader_pass].source.path,
|
||||
|
@ -224,7 +224,7 @@ static int action_ok_shader_preset_load(const char *path,
|
|||
(void)shader_path;
|
||||
(void)menu_path;
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack, &menu_path, NULL,
|
||||
menu_list_get_last_stack(driver.menu->menu_list, &menu_path, NULL,
|
||||
NULL);
|
||||
|
||||
fill_pathname_join(shader_path, menu_path, path, sizeof(shader_path));
|
||||
|
@ -259,7 +259,7 @@ static int action_ok_path_use_directory(const char *path,
|
|||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
&menu_path, &menu_label, NULL);
|
||||
|
||||
setting = (rarch_setting_t*)
|
||||
|
@ -301,7 +301,7 @@ static int action_ok_core_load(const char *path,
|
|||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
&menu_path, NULL, NULL);
|
||||
|
||||
fill_pathname_join(g_settings.libretro, menu_path, path,
|
||||
|
@ -338,7 +338,7 @@ static int action_ok_compressed_archive_push(const char *path,
|
|||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
&menu_path, &menu_label, NULL);
|
||||
|
||||
if (!strcmp(menu_label, "detect_core_list"))
|
||||
|
@ -369,7 +369,7 @@ static int action_ok_directory_push(const char *path,
|
|||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
&menu_path, &menu_label, NULL);
|
||||
|
||||
fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path));
|
||||
|
@ -392,7 +392,7 @@ static int action_ok_config_load(const char *path,
|
|||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
&menu_path, NULL, NULL);
|
||||
|
||||
fill_pathname_join(config, menu_path, path, sizeof(config));
|
||||
|
@ -416,7 +416,7 @@ static int action_ok_disk_image_append(const char *path,
|
|||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
&menu_path, NULL, NULL);
|
||||
|
||||
fill_pathname_join(image, menu_path, path, sizeof(image));
|
||||
|
@ -437,7 +437,7 @@ static int action_ok_file_load_with_detect_core(const char *path,
|
|||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
&menu_path, NULL, NULL);
|
||||
|
||||
ret = rarch_defer_core(g_extern.core_info,
|
||||
|
@ -511,7 +511,7 @@ static int action_ok_set_path(const char *path,
|
|||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
&menu_path, &menu_label, NULL);
|
||||
|
||||
setting = (rarch_setting_t*)
|
||||
|
@ -2228,7 +2228,7 @@ static int menu_entries_cbs_init_bind_ok_first(menu_file_list_cbs_t *cbs,
|
|||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
NULL, &menu_label, NULL);
|
||||
|
||||
if (type >= MENU_SETTINGS_BIND_BEGIN &&
|
||||
|
@ -2458,7 +2458,7 @@ static void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
|||
if (!cbs || !driver.menu)
|
||||
return;
|
||||
|
||||
menu_list_get_last_stack(driver.menu->menu_list->menu_stack,
|
||||
menu_list_get_last_stack(driver.menu->menu_list,
|
||||
NULL, &menu_label, NULL);
|
||||
|
||||
cbs->action_deferred_push = deferred_push_default;
|
||||
|
|
|
@ -95,12 +95,12 @@ void menu_list_get_last(const file_list_t *list,
|
|||
file_list_get_last(list, path, label, file_type);
|
||||
}
|
||||
|
||||
void menu_list_get_last_stack(const file_list_t *list,
|
||||
void menu_list_get_last_stack(const menu_list_t *list,
|
||||
const char **path, const char **label,
|
||||
unsigned *file_type)
|
||||
{
|
||||
if (list)
|
||||
file_list_get_last(list, path, label, file_type);
|
||||
file_list_get_last(list->menu_stack, path, label, file_type);
|
||||
}
|
||||
|
||||
void *menu_list_get_actiondata_at_offset(const file_list_t *list, size_t index)
|
||||
|
|
|
@ -65,7 +65,7 @@ void menu_list_get_last(const file_list_t *list,
|
|||
const char **path, const char **label,
|
||||
unsigned *file_type);
|
||||
|
||||
void menu_list_get_last_stack(const file_list_t *list,
|
||||
void menu_list_get_last_stack(const menu_list_t *list,
|
||||
const char **path, const char **label,
|
||||
unsigned *file_type);
|
||||
|
||||
|
|
Loading…
Reference in New Issue