mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(Menu) Refactor all ST_DIR settings - take out all enums for them -
should fix the "Use Directory" option
This commit is contained in:
parent
025105a2f5
commit
d94a5e6eca
@ -84,34 +84,36 @@ static void get_title(const char *label, const char *dir,
|
||||
snprintf(title, sizeof_title, "DSP FILTER %s", dir);
|
||||
else if (!strcmp(label, "rgui_browser_directory"))
|
||||
snprintf(title, sizeof_title, "BROWSER DIR %s", dir);
|
||||
else if (menu_type == MENU_CONTENT_DIR_PATH)
|
||||
else if (!strcmp(label, "content_directory"))
|
||||
snprintf(title, sizeof_title, "CONTENT DIR %s", dir);
|
||||
else if (menu_type == MENU_SCREENSHOT_DIR_PATH)
|
||||
else if (!strcmp(label, "screenshot_directory"))
|
||||
snprintf(title, sizeof_title, "SCREENSHOT DIR %s", dir);
|
||||
else if (menu_type == MENU_AUTOCONFIG_DIR_PATH)
|
||||
snprintf(title, sizeof_title, "AUTOCONFIG DIR %s", dir);
|
||||
else if (menu_type == MENU_SHADER_DIR_PATH)
|
||||
else if (!strcmp(label, "video_shader_dir"))
|
||||
snprintf(title, sizeof_title, "SHADER DIR %s", dir);
|
||||
else if (menu_type == MENU_FILTER_DIR_PATH)
|
||||
else if (!strcmp(label, "video_filter_dir"))
|
||||
snprintf(title, sizeof_title, "FILTER DIR %s", dir);
|
||||
else if (menu_type == MENU_DSP_FILTER_DIR_PATH)
|
||||
else if (!strcmp(label, "audio_filter_dir"))
|
||||
snprintf(title, sizeof_title, "DSP FILTER DIR %s", dir);
|
||||
else if (menu_type == MENU_SAVESTATE_DIR_PATH)
|
||||
else if (!strcmp(label, "savestate_directory"))
|
||||
snprintf(title, sizeof_title, "SAVESTATE DIR %s", dir);
|
||||
#ifdef HAVE_DYNAMIC
|
||||
else if (menu_type == MENU_LIBRETRO_DIR_PATH)
|
||||
else if (!strcmp(label, "libretro_dir_path"))
|
||||
snprintf(title, sizeof_title, "LIBRETRO DIR %s", dir);
|
||||
#endif
|
||||
else if (menu_type == MENU_CONFIG_DIR_PATH)
|
||||
else if (!strcmp(label, "libretro_info_path"))
|
||||
snprintf(title, sizeof_title, "LIBRETRO INFO DIR %s", dir);
|
||||
else if (!strcmp(label, "rgui_config_directory"))
|
||||
snprintf(title, sizeof_title, "CONFIG DIR %s", dir);
|
||||
else if (menu_type == MENU_SAVEFILE_DIR_PATH)
|
||||
else if (!strcmp(label, "savefile_directory"))
|
||||
snprintf(title, sizeof_title, "SAVEFILE DIR %s", dir);
|
||||
else if (menu_type == MENU_OVERLAY_DIR_PATH)
|
||||
else if (!strcmp(label, "overlay_directory"))
|
||||
snprintf(title, sizeof_title, "OVERLAY DIR %s", dir);
|
||||
else if (menu_type == MENU_SYSTEM_DIR_PATH)
|
||||
else if (!strcmp(label, "system_directory"))
|
||||
snprintf(title, sizeof_title, "SYSTEM DIR %s", dir);
|
||||
else if (menu_type == MENU_ASSETS_DIR_PATH)
|
||||
else if (!strcmp(label, "assets_directory"))
|
||||
snprintf(title, sizeof_title, "ASSETS DIR %s", dir);
|
||||
else if (!strcmp(label, "extraction_directory"))
|
||||
snprintf(title, sizeof_title, "EXTRACTION DIR %s", dir);
|
||||
else if (!strcmp(label, "joypad_autoconfig_dir"))
|
||||
snprintf(title, sizeof_title, "AUTOCONFIG DIR %s", dir);
|
||||
else
|
||||
{
|
||||
if (driver.menu->defer_core)
|
||||
|
@ -677,22 +677,22 @@ unsigned menu_common_type_is(const char *label, unsigned type)
|
||||
return MENU_SETTINGS_SHADER_OPTIONS;
|
||||
|
||||
if (
|
||||
type == MENU_BROWSER_DIR_PATH ||
|
||||
type == MENU_CONTENT_DIR_PATH ||
|
||||
type == MENU_ASSETS_DIR_PATH ||
|
||||
type == MENU_SHADER_DIR_PATH ||
|
||||
type == MENU_FILTER_DIR_PATH ||
|
||||
type == MENU_DSP_FILTER_DIR_PATH ||
|
||||
type == MENU_SAVESTATE_DIR_PATH ||
|
||||
type == MENU_LIBRETRO_DIR_PATH ||
|
||||
type == MENU_LIBRETRO_INFO_DIR_PATH ||
|
||||
type == MENU_CONFIG_DIR_PATH ||
|
||||
type == MENU_SAVEFILE_DIR_PATH ||
|
||||
type == MENU_OVERLAY_DIR_PATH ||
|
||||
type == MENU_SCREENSHOT_DIR_PATH ||
|
||||
type == MENU_AUTOCONFIG_DIR_PATH ||
|
||||
type == MENU_EXTRACTION_DIR_PATH ||
|
||||
type == MENU_SYSTEM_DIR_PATH)
|
||||
!strcmp(label, "rgui_browser_directory") ||
|
||||
!strcmp(label, "content_directory") ||
|
||||
!strcmp(label, "assets_directory") ||
|
||||
!strcmp(label, "video_shader_dir") ||
|
||||
!strcmp(label, "video_filter_dir") ||
|
||||
!strcmp(label, "audio_filter_dir") ||
|
||||
!strcmp(label, "savestate_directory") ||
|
||||
!strcmp(label, "libretro_dir_path") ||
|
||||
!strcmp(label, "libretro_info_path") ||
|
||||
!strcmp(label, "rgui_config_directory") ||
|
||||
!strcmp(label, "savefile_directory") ||
|
||||
!strcmp(label, "overlay_directory") ||
|
||||
!strcmp(label, "screenshot_directory") ||
|
||||
!strcmp(label, "joypad_autoconfig_dir") ||
|
||||
!strcmp(label, "extraction_directory") ||
|
||||
!strcmp(label, "system_directory"))
|
||||
return MENU_FILE_DIRECTORY;
|
||||
|
||||
return 0;
|
||||
|
@ -119,23 +119,7 @@ typedef enum
|
||||
MENU_SETTINGS_DISK_OPTIONS,
|
||||
MENU_SETTINGS_DISK_INDEX,
|
||||
MENU_SETTINGS_DISK_APPEND,
|
||||
MENU_SCREENSHOT_DIR_PATH,
|
||||
MENU_BROWSER_DIR_PATH,
|
||||
MENU_CONTENT_HISTORY_PATH,
|
||||
MENU_CONTENT_DIR_PATH,
|
||||
MENU_ASSETS_DIR_PATH,
|
||||
MENU_FILTER_DIR_PATH,
|
||||
MENU_DSP_FILTER_DIR_PATH,
|
||||
MENU_SHADER_DIR_PATH,
|
||||
MENU_SAVESTATE_DIR_PATH,
|
||||
MENU_SAVEFILE_DIR_PATH,
|
||||
MENU_LIBRETRO_DIR_PATH,
|
||||
MENU_LIBRETRO_INFO_DIR_PATH,
|
||||
MENU_CONFIG_DIR_PATH,
|
||||
MENU_OVERLAY_DIR_PATH,
|
||||
MENU_SYSTEM_DIR_PATH,
|
||||
MENU_AUTOCONFIG_DIR_PATH,
|
||||
MENU_EXTRACTION_DIR_PATH,
|
||||
|
||||
MENU_SETTINGS_OVERLAY_PRESET,
|
||||
MENU_SETTINGS_BIND_PLAYER,
|
||||
|
@ -465,36 +465,23 @@ int menu_entries_push_list(menu_handle_t *menu,
|
||||
break;
|
||||
case MENU_SETTINGS_PATH_OPTIONS:
|
||||
file_list_clear(list);
|
||||
add_setting_entry(menu,list,"rgui_browser_directory",
|
||||
MENU_BROWSER_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"content_directory",
|
||||
MENU_CONTENT_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"assets_directory",
|
||||
MENU_ASSETS_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"rgui_config_directory",
|
||||
MENU_CONFIG_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"libretro_dir_path",
|
||||
MENU_LIBRETRO_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"libretro_info_path",
|
||||
MENU_LIBRETRO_INFO_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"game_history_path",
|
||||
MENU_CONTENT_HISTORY_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"video_filter_dir",
|
||||
MENU_FILTER_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"audio_filter_dir",
|
||||
MENU_DSP_FILTER_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"video_shader_dir", MENU_SHADER_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"savestate_directory", MENU_SAVESTATE_DIR_PATH,
|
||||
setting_data);
|
||||
add_setting_entry(menu,list,"savefile_directory", MENU_SAVEFILE_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"overlay_directory", MENU_OVERLAY_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"system_directory", MENU_SYSTEM_DIR_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"screenshot_directory", MENU_SCREENSHOT_DIR_PATH,
|
||||
setting_data);
|
||||
add_setting_entry(menu,list,"joypad_autoconfig_dir", MENU_AUTOCONFIG_DIR_PATH,
|
||||
setting_data);
|
||||
add_setting_entry(menu,list,"extraction_directory", MENU_EXTRACTION_DIR_PATH,
|
||||
setting_data);
|
||||
add_setting_entry(menu,list,"rgui_browser_directory", 0, setting_data);
|
||||
add_setting_entry(menu,list,"content_directory", 0, setting_data);
|
||||
add_setting_entry(menu,list,"assets_directory", 0, setting_data);
|
||||
add_setting_entry(menu,list,"rgui_config_directory", 0, setting_data);
|
||||
add_setting_entry(menu,list,"libretro_dir_path", 0, setting_data);
|
||||
add_setting_entry(menu,list,"libretro_info_path", 0, setting_data);
|
||||
add_setting_entry(menu,list,"game_history_path", MENU_CONTENT_HISTORY_PATH, setting_data);
|
||||
add_setting_entry(menu,list,"video_filter_dir", 0, setting_data);
|
||||
add_setting_entry(menu,list,"audio_filter_dir", 0, setting_data);
|
||||
add_setting_entry(menu,list,"video_shader_dir", 0, setting_data);
|
||||
add_setting_entry(menu,list,"savestate_directory", 0, setting_data);
|
||||
add_setting_entry(menu,list,"savefile_directory", 0, setting_data);
|
||||
add_setting_entry(menu,list,"overlay_directory", 0, setting_data);
|
||||
add_setting_entry(menu,list,"system_directory", 0, setting_data);
|
||||
add_setting_entry(menu,list,"screenshot_directory", 0, setting_data);
|
||||
add_setting_entry(menu,list,"joypad_autoconfig_dir", 0, setting_data);
|
||||
add_setting_entry(menu,list,"extraction_directory", 0, setting_data);
|
||||
break;
|
||||
case MENU_SETTINGS_INPUT_OPTIONS:
|
||||
file_list_clear(list);
|
||||
@ -746,9 +733,7 @@ int menu_parse_and_resolve(file_list_t *list, file_list_t *menu_list)
|
||||
|
||||
dir_list_sort(str_list, true);
|
||||
|
||||
//FIXME - needs to be refactored to use actual strings instead
|
||||
//of type here
|
||||
//if (menu_common_type_is(label, menu_type) == MENU_FILE_DIRECTORY)
|
||||
if (menu_common_type_is(label, menu_type) == MENU_FILE_DIRECTORY)
|
||||
file_list_push(list, "<Use this directory>", "",
|
||||
MENU_FILE_USE_DIRECTORY, 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user