diff --git a/frontend/menu/disp/shared.h b/frontend/menu/disp/shared.h index 5713aad178..8d430a17f0 100644 --- a/frontend/menu/disp/shared.h +++ b/frontend/menu/disp/shared.h @@ -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) diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c index f0d19af148..d99446feff 100644 --- a/frontend/menu/menu_common.c +++ b/frontend/menu/menu_common.c @@ -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; diff --git a/frontend/menu/menu_common.h b/frontend/menu/menu_common.h index 0c70208645..1587a5b4bd 100644 --- a/frontend/menu/menu_common.h +++ b/frontend/menu/menu_common.h @@ -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, diff --git a/frontend/menu/menu_entries.c b/frontend/menu/menu_entries.c index 3c1959371d..0f28991273 100644 --- a/frontend/menu/menu_entries.c +++ b/frontend/menu/menu_entries.c @@ -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, "", "", MENU_FILE_USE_DIRECTORY, 0);