mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
(Menu) Add more MENU_FILE_* types
This commit is contained in:
parent
3af183dfe3
commit
176951cc5f
@ -1425,18 +1425,6 @@ static int menu_action_ok(const char *menu_path,
|
||||
menu_common_setting_set_current_string_path(setting, menu_path, path);
|
||||
menu_entries_pop_stack(driver.menu->menu_stack, setting->name);
|
||||
}
|
||||
else if (!strcmp(menu_label, "configurations"))
|
||||
{
|
||||
char config[PATH_MAX];
|
||||
fill_pathname_join(config, menu_path, path, sizeof(config));
|
||||
menu_flush_stack_type(driver.menu->menu_stack,MENU_SETTINGS);
|
||||
driver.menu->msg_force = true;
|
||||
if (rarch_replace_config(config))
|
||||
{
|
||||
menu_clear_navigation(driver.menu);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(menu_label, "disk_image_append"))
|
||||
{
|
||||
char image[PATH_MAX];
|
||||
@ -1451,6 +1439,31 @@ static int menu_action_ok(const char *menu_path,
|
||||
|
||||
return 0;
|
||||
|
||||
case MENU_FILE_CONFIG:
|
||||
|
||||
{
|
||||
char config[PATH_MAX];
|
||||
fill_pathname_join(config, menu_path, path, sizeof(config));
|
||||
menu_flush_stack_type(driver.menu->menu_stack,MENU_SETTINGS);
|
||||
driver.menu->msg_force = true;
|
||||
if (rarch_replace_config(config))
|
||||
{
|
||||
menu_clear_navigation(driver.menu);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
case MENU_FILE_OVERLAY:
|
||||
case MENU_FILE_AUDIOFILTER:
|
||||
case MENU_FILE_VIDEOFILTER:
|
||||
|
||||
menu_common_setting_set_current_string_path(setting, menu_path, path);
|
||||
menu_entries_pop_stack(driver.menu->menu_stack, setting->name);
|
||||
|
||||
return 0;
|
||||
|
||||
case MENU_FILE_SHADER_PRESET:
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
{
|
||||
|
@ -177,6 +177,23 @@ static void disp_set_label(unsigned *w, unsigned type, unsigned i,
|
||||
strlcpy(type_str, "(SHADER)", type_str_size);
|
||||
*w = 8;
|
||||
}
|
||||
else if (
|
||||
type == MENU_FILE_VIDEOFILTER ||
|
||||
type == MENU_FILE_AUDIOFILTER)
|
||||
{
|
||||
strlcpy(type_str, "(FILTER)", type_str_size);
|
||||
*w = 8;
|
||||
}
|
||||
else if (type == MENU_FILE_CONFIG)
|
||||
{
|
||||
strlcpy(type_str, "(CONFIG)", type_str_size);
|
||||
*w = 8;
|
||||
}
|
||||
else if (type == MENU_FILE_OVERLAY)
|
||||
{
|
||||
strlcpy(type_str, "(OVERLAY)", type_str_size);
|
||||
*w = 9;
|
||||
}
|
||||
else if (type >= MENU_SETTINGS_CORE_OPTION_START)
|
||||
strlcpy(
|
||||
type_str,
|
||||
|
@ -66,6 +66,10 @@ typedef enum
|
||||
MENU_FILE_PLAYLIST_ENTRY,
|
||||
MENU_FILE_SHADER_PRESET,
|
||||
MENU_FILE_SHADER,
|
||||
MENU_FILE_VIDEOFILTER,
|
||||
MENU_FILE_AUDIOFILTER,
|
||||
MENU_FILE_OVERLAY,
|
||||
MENU_FILE_CONFIG,
|
||||
MENU_FILE_USE_DIRECTORY,
|
||||
MENU_FILE_SWITCH,
|
||||
MENU_FILE_CARCHIVE,
|
||||
|
@ -670,7 +670,10 @@ int menu_parse_and_resolve(file_list_t *list, file_list_t *menu_list)
|
||||
if (!strcmp(label, "core_list"))
|
||||
exts = EXT_EXECUTABLES;
|
||||
else if (!strcmp(label, "configurations"))
|
||||
{
|
||||
exts = "cfg";
|
||||
default_type_plain = MENU_FILE_CONFIG;
|
||||
}
|
||||
else if (!strcmp(label, "video_shader_preset"))
|
||||
{
|
||||
exts = "cgp|glslp";
|
||||
@ -682,11 +685,20 @@ int menu_parse_and_resolve(file_list_t *list, file_list_t *menu_list)
|
||||
default_type_plain = MENU_FILE_SHADER;
|
||||
}
|
||||
else if (!strcmp(label, "video_filter"))
|
||||
{
|
||||
exts = "filt";
|
||||
default_type_plain = MENU_FILE_VIDEOFILTER;
|
||||
}
|
||||
else if (!strcmp(label, "audio_dsp_plugin"))
|
||||
{
|
||||
exts = "dsp";
|
||||
default_type_plain = MENU_FILE_AUDIOFILTER;
|
||||
}
|
||||
else if (!strcmp(label, "input_overlay"))
|
||||
{
|
||||
exts = "cfg";
|
||||
default_type_plain = MENU_FILE_OVERLAY;
|
||||
}
|
||||
else if (!strcmp(label, "game_history_path"))
|
||||
exts = "cfg";
|
||||
else if (menu_common_type_is(label, menu_type) == MENU_FILE_DIRECTORY)
|
||||
|
Loading…
x
Reference in New Issue
Block a user