mirror of
https://github.com/libretro/RetroArch
synced 2025-04-24 06:02:36 +00:00
Create wrapper function menu_list_push_stack_refresh
This commit is contained in:
parent
4c6aff67f2
commit
25efe98704
@ -503,7 +503,7 @@ static int menu_load_or_open_zip_iterate(unsigned action)
|
|||||||
char cat_path[PATH_MAX];
|
char cat_path[PATH_MAX];
|
||||||
|
|
||||||
fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path));
|
fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path));
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
cat_path,
|
cat_path,
|
||||||
menu_label,
|
menu_label,
|
||||||
@ -523,7 +523,7 @@ static int menu_load_or_open_zip_iterate(unsigned action)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (ret == 0)
|
else if (ret == 0)
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
g_settings.libretro_directory,
|
g_settings.libretro_directory,
|
||||||
"deferred_core_list",
|
"deferred_core_list",
|
||||||
|
@ -107,7 +107,7 @@ static int menu_entries_set_current_path_selection(
|
|||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case MENU_ACTION_OK:
|
case MENU_ACTION_OK:
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
start_path,
|
start_path,
|
||||||
label,
|
label,
|
||||||
|
@ -127,7 +127,7 @@ static int action_ok_push_content_list(const char *path,
|
|||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
g_settings.menu_content_directory,
|
g_settings.menu_content_directory,
|
||||||
label,
|
label,
|
||||||
@ -154,7 +154,7 @@ static int action_ok_push_history_list(const char *path,
|
|||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
"",
|
"",
|
||||||
label,
|
label,
|
||||||
@ -169,7 +169,7 @@ static int action_ok_push_path_list(const char *path,
|
|||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
"",
|
"",
|
||||||
label,
|
label,
|
||||||
@ -343,7 +343,7 @@ static int action_ok_compressed_archive_push(const char *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path));
|
fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path));
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
cat_path,
|
cat_path,
|
||||||
menu_label,
|
menu_label,
|
||||||
@ -366,7 +366,7 @@ static int action_ok_directory_push(const char *path,
|
|||||||
file_list_get_last(driver.menu->menu_stack, &menu_path, &menu_label, NULL);
|
file_list_get_last(driver.menu->menu_stack, &menu_path, &menu_label, NULL);
|
||||||
|
|
||||||
fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path));
|
fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path));
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
cat_path,
|
cat_path,
|
||||||
menu_label,
|
menu_label,
|
||||||
@ -441,7 +441,7 @@ static int action_ok_file_load_with_detect_core(const char *path,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else if (ret == 0)
|
else if (ret == 0)
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
g_settings.libretro_directory,
|
g_settings.libretro_directory,
|
||||||
"deferred_core_list",
|
"deferred_core_list",
|
||||||
@ -639,7 +639,7 @@ static int action_ok_core_list(const char *path,
|
|||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
menu_list_push_refresh(driver.menu->menu_stack,
|
menu_list_push_stack_refresh(driver.menu->menu_stack,
|
||||||
dir, label, type,
|
dir, label, type,
|
||||||
driver.menu->selection_ptr);
|
driver.menu->selection_ptr);
|
||||||
|
|
||||||
@ -654,7 +654,7 @@ static int action_ok_disk_image_append_list(const char *path,
|
|||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
menu_list_push_refresh(driver.menu->menu_stack,
|
menu_list_push_stack_refresh(driver.menu->menu_stack,
|
||||||
dir, label, type,
|
dir, label, type,
|
||||||
driver.menu->selection_ptr);
|
driver.menu->selection_ptr);
|
||||||
return 0;
|
return 0;
|
||||||
@ -667,7 +667,7 @@ static int action_ok_configurations_list(const char *path,
|
|||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
menu_list_push_refresh(driver.menu->menu_stack,
|
menu_list_push_stack_refresh(driver.menu->menu_stack,
|
||||||
dir ? dir : label, label, type,
|
dir ? dir : label, label, type,
|
||||||
driver.menu->selection_ptr);
|
driver.menu->selection_ptr);
|
||||||
return 0;
|
return 0;
|
||||||
@ -679,7 +679,7 @@ static int action_ok_push_default(const char *path,
|
|||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
menu_list_push_refresh(driver.menu->menu_stack,
|
menu_list_push_stack_refresh(driver.menu->menu_stack,
|
||||||
label, label, type,
|
label, label, type,
|
||||||
driver.menu->selection_ptr);
|
driver.menu->selection_ptr);
|
||||||
return 0;
|
return 0;
|
||||||
@ -799,7 +799,7 @@ static int action_ok_shader_pass(const char *path,
|
|||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
g_settings.video.shader_dir,
|
g_settings.video.shader_dir,
|
||||||
"video_shader_pass",
|
"video_shader_pass",
|
||||||
@ -833,7 +833,7 @@ static int action_ok_shader_preset(const char *path,
|
|||||||
if (!driver.menu)
|
if (!driver.menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
g_settings.video.shader_dir,
|
g_settings.video.shader_dir,
|
||||||
"video_shader_preset",
|
"video_shader_preset",
|
||||||
@ -997,7 +997,7 @@ static int action_ok_shader_parameters(const char *path,
|
|||||||
const char *label, unsigned type, size_t index)
|
const char *label, unsigned type, size_t index)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack, "",
|
driver.menu->menu_stack, "",
|
||||||
"video_shader_parameters",
|
"video_shader_parameters",
|
||||||
MENU_FILE_PUSH,
|
MENU_FILE_PUSH,
|
||||||
|
@ -203,3 +203,14 @@ void menu_list_push_stack(file_list_t *list,
|
|||||||
{
|
{
|
||||||
menu_list_push(list, path, label, type, directory_ptr);
|
menu_list_push(list, path, label, type, directory_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void menu_list_push_stack_refresh(file_list_t *list,
|
||||||
|
const char *path, const char *label,
|
||||||
|
unsigned type, size_t directory_ptr)
|
||||||
|
{
|
||||||
|
if (!list)
|
||||||
|
return;
|
||||||
|
menu_list_push_stack(list, path, label, type, directory_ptr);
|
||||||
|
menu_navigation_clear(driver.menu, true);
|
||||||
|
driver.menu->need_refresh = true;
|
||||||
|
}
|
||||||
|
@ -56,6 +56,10 @@ void menu_list_push_stack(file_list_t *list,
|
|||||||
const char *path, const char *label,
|
const char *path, const char *label,
|
||||||
unsigned type, size_t directory_ptr);
|
unsigned type, size_t directory_ptr);
|
||||||
|
|
||||||
|
void menu_list_push_stack_refresh(file_list_t *list,
|
||||||
|
const char *path, const char *label,
|
||||||
|
unsigned type, size_t directory_ptr);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2384,7 +2384,7 @@ static void general_write_handler(void *data)
|
|||||||
if (*setting->value.boolean)
|
if (*setting->value.boolean)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_list_push_refresh(
|
menu_list_push_stack_refresh(
|
||||||
driver.menu->menu_stack,
|
driver.menu->menu_stack,
|
||||||
"",
|
"",
|
||||||
"help",
|
"help",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user