diff --git a/.gitignore b/.gitignore index 07616e6e85..a30c235d69 100644 --- a/.gitignore +++ b/.gitignore @@ -78,6 +78,7 @@ convert_rumble.awk *~ assets info +content_favorites.lpl content_history.lpl content_image_history.lpl content_music_history.lpl diff --git a/configuration.c b/configuration.c index 23652761e4..7b6c9b8486 100644 --- a/configuration.c +++ b/configuration.c @@ -1284,16 +1284,16 @@ static struct config_path_setting *populate_settings_path( SETTING_PATH("rgui_menu_theme_preset", settings->paths.path_rgui_theme_preset, false, NULL, true); #endif - SETTING_PATH("content_history_path", - settings->paths.path_content_history, false, NULL, true); SETTING_PATH("content_favorites_path", settings->paths.path_content_favorites, false, NULL, true); + SETTING_PATH("content_history_path", + settings->paths.path_content_history, false, NULL, true); + SETTING_PATH("content_image_history_path", + settings->paths.path_content_image_history, false, NULL, true); SETTING_PATH("content_music_history_path", settings->paths.path_content_music_history, false, NULL, true); SETTING_PATH("content_video_history_path", settings->paths.path_content_video_history, false, NULL, true); - SETTING_PATH("content_image_history_path", - settings->paths.path_content_image_history, false, NULL, true); #ifdef HAVE_OVERLAY SETTING_PATH("input_overlay", settings->paths.path_overlay, false, NULL, true); @@ -1314,8 +1314,6 @@ static struct config_path_setting *populate_settings_path( settings->paths.path_font, false, NULL, true); SETTING_PATH("cursor_directory", settings->paths.directory_cursor, false, NULL, true); - SETTING_PATH("content_history_dir", - settings->paths.directory_content_history, false, NULL, true); SETTING_PATH("screenshot_directory", settings->paths.directory_screenshot, true, NULL, true); SETTING_PATH("system_directory", @@ -1340,6 +1338,16 @@ static struct config_path_setting *populate_settings_path( settings->paths.directory_thumbnails, true, NULL, true); SETTING_PATH("playlist_directory", settings->paths.directory_playlist, true, NULL, true); + SETTING_PATH("content_favorites_directory", + settings->paths.directory_content_favorites, true, NULL, true); + SETTING_PATH("content_history_directory", + settings->paths.directory_content_history, true, NULL, true); + SETTING_PATH("content_image_history_directory", + settings->paths.directory_content_image_history, true, NULL, true); + SETTING_PATH("content_music_history_directory", + settings->paths.directory_content_music_history, true, NULL, true); + SETTING_PATH("content_video_directory", + settings->paths.directory_content_video_history, true, NULL, true); SETTING_PATH("runtime_log_directory", settings->paths.directory_runtime_log, true, NULL, true); SETTING_PATH("joypad_autoconfig_dir", @@ -2397,6 +2405,11 @@ void config_set_defaults(void *data) *settings->paths.directory_dynamic_wallpapers = '\0'; *settings->paths.directory_thumbnails = '\0'; *settings->paths.directory_playlist = '\0'; + *settings->paths.directory_content_favorites = '\0'; + *settings->paths.directory_content_history = '\0'; + *settings->paths.directory_content_image_history = '\0'; + *settings->paths.directory_content_music_history = '\0'; + *settings->paths.directory_content_video_history = '\0'; *settings->paths.directory_runtime_log = '\0'; *settings->paths.directory_autoconfig = '\0'; #ifdef HAVE_MENU @@ -2418,10 +2431,10 @@ void config_set_defaults(void *data) } *settings->paths.path_core_options = '\0'; - *settings->paths.path_content_history = '\0'; *settings->paths.path_content_favorites = '\0'; - *settings->paths.path_content_music_history = '\0'; + *settings->paths.path_content_history = '\0'; *settings->paths.path_content_image_history = '\0'; + *settings->paths.path_content_music_history = '\0'; *settings->paths.path_content_video_history = '\0'; *settings->paths.path_cheat_settings = '\0'; #ifndef IOS @@ -2442,7 +2455,6 @@ void config_set_defaults(void *data) *settings->paths.path_stream_url = '\0'; *settings->paths.path_softfilter_plugin = '\0'; - *settings->paths.directory_content_history = '\0'; *settings->paths.path_audio_dsp_plugin = '\0'; *settings->paths.log_dir = '\0'; @@ -2477,6 +2489,26 @@ void config_set_defaults(void *data) configuration_set_string(settings, settings->paths.directory_playlist, g_defaults.dirs[DEFAULT_DIR_PLAYLIST]); + if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_CONTENT_FAVORITES])) + configuration_set_string(settings, + settings->paths.directory_content_favorites, + g_defaults.dirs[DEFAULT_DIR_CONTENT_FAVORITES]); + if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY])) + configuration_set_string(settings, + settings->paths.directory_content_history, + g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY]); + if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_CONTENT_IMAGE_HISTORY])) + configuration_set_string(settings, + settings->paths.directory_content_image_history, + g_defaults.dirs[DEFAULT_DIR_CONTENT_IMAGE_HISTORY]); + if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_CONTENT_MUSIC_HISTORY])) + configuration_set_string(settings, + settings->paths.directory_content_music_history, + g_defaults.dirs[DEFAULT_DIR_CONTENT_MUSIC_HISTORY]); + if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_CONTENT_VIDEO_HISTORY])) + configuration_set_string(settings, + settings->paths.directory_content_video_history, + g_defaults.dirs[DEFAULT_DIR_CONTENT_VIDEO_HISTORY]); if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_CORE])) fill_pathname_expand_special(settings->paths.directory_libretro, g_defaults.dirs[DEFAULT_DIR_CORE], @@ -2590,10 +2622,6 @@ void config_set_defaults(void *data) configuration_set_string(settings, settings->paths.directory_resampler, g_defaults.dirs[DEFAULT_DIR_RESAMPLER]); - if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY])) - configuration_set_string(settings, - settings->paths.directory_content_history, - g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY]); if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_LOGS])) configuration_set_string(settings, settings->paths.log_dir, @@ -3179,80 +3207,85 @@ static bool config_load_file(global_t *global, path_config = path_get(RARCH_PATH_CONFIG); - if (string_is_empty(settings->paths.path_content_history)) - { - if (string_is_empty(settings->paths.directory_content_history)) - fill_pathname_resolve_relative( - settings->paths.path_content_history, - path_config, - FILE_PATH_CONTENT_HISTORY, - sizeof(settings->paths.path_content_history)); - else - fill_pathname_join(settings->paths.path_content_history, - settings->paths.directory_content_history, - FILE_PATH_CONTENT_HISTORY, - sizeof(settings->paths.path_content_history)); - } - if (string_is_empty(settings->paths.path_content_favorites)) - { - if (string_is_empty(settings->paths.directory_content_history)) + strlcpy(settings->paths.directory_content_favorites, "default", sizeof(settings->paths.directory_content_favorites)); + + if (string_is_empty(settings->paths.directory_content_favorites) || string_is_equal(settings->paths.directory_content_favorites, "default")) fill_pathname_resolve_relative( settings->paths.path_content_favorites, path_config, FILE_PATH_CONTENT_FAVORITES, sizeof(settings->paths.path_content_favorites)); - else - fill_pathname_join(settings->paths.path_content_favorites, - settings->paths.directory_content_history, + else + fill_pathname_join( + settings->paths.path_content_favorites, + settings->paths.directory_content_favorites, FILE_PATH_CONTENT_FAVORITES, sizeof(settings->paths.path_content_favorites)); - } - if (string_is_empty(settings->paths.path_content_music_history)) - { - if (string_is_empty(settings->paths.directory_content_history)) - fill_pathname_resolve_relative( - settings->paths.path_content_music_history, - path_config, - FILE_PATH_CONTENT_MUSIC_HISTORY, - sizeof(settings->paths.path_content_music_history)); - else - fill_pathname_join(settings->paths.path_content_music_history, - settings->paths.directory_content_history, - FILE_PATH_CONTENT_MUSIC_HISTORY, - sizeof(settings->paths.path_content_music_history)); - } + if (string_is_empty(settings->paths.path_content_history)) + strlcpy(settings->paths.directory_content_history, "default", sizeof(settings->paths.directory_content_history)); - if (string_is_empty(settings->paths.path_content_video_history)) - { - if (string_is_empty(settings->paths.directory_content_history)) + if (string_is_empty(settings->paths.directory_content_history) || string_is_equal(settings->paths.directory_content_history, "default")) fill_pathname_resolve_relative( - settings->paths.path_content_video_history, + settings->paths.path_content_history, path_config, - FILE_PATH_CONTENT_VIDEO_HISTORY, - sizeof(settings->paths.path_content_video_history)); - else - fill_pathname_join(settings->paths.path_content_video_history, + FILE_PATH_CONTENT_HISTORY, + sizeof(settings->paths.path_content_history)); + else + fill_pathname_join( + settings->paths.path_content_history, settings->paths.directory_content_history, - FILE_PATH_CONTENT_VIDEO_HISTORY, - sizeof(settings->paths.path_content_video_history)); - } + FILE_PATH_CONTENT_HISTORY, + sizeof(settings->paths.path_content_history)); if (string_is_empty(settings->paths.path_content_image_history)) - { - if (string_is_empty(settings->paths.directory_content_history)) + strlcpy(settings->paths.directory_content_image_history, "default", sizeof(settings->paths.directory_content_image_history)); + + if (string_is_empty(settings->paths.directory_content_image_history) || string_is_equal(settings->paths.directory_content_image_history, "default")) fill_pathname_resolve_relative( settings->paths.path_content_image_history, path_config, FILE_PATH_CONTENT_IMAGE_HISTORY, sizeof(settings->paths.path_content_image_history)); - else - fill_pathname_join(settings->paths.path_content_image_history, - settings->paths.directory_content_history, + else + fill_pathname_join( + settings->paths.path_content_image_history, + settings->paths.directory_content_image_history, FILE_PATH_CONTENT_IMAGE_HISTORY, sizeof(settings->paths.path_content_image_history)); - } + + if (string_is_empty(settings->paths.path_content_music_history)) + strlcpy(settings->paths.directory_content_music_history, "default", sizeof(settings->paths.directory_content_music_history)); + + if (string_is_empty(settings->paths.directory_content_music_history) || string_is_equal(settings->paths.directory_content_music_history, "default")) + fill_pathname_resolve_relative( + settings->paths.path_content_music_history, + path_config, + FILE_PATH_CONTENT_MUSIC_HISTORY, + sizeof(settings->paths.path_content_music_history)); + else + fill_pathname_join( + settings->paths.path_content_music_history, + settings->paths.directory_content_music_history, + FILE_PATH_CONTENT_MUSIC_HISTORY, + sizeof(settings->paths.path_content_music_history)); + + if (string_is_empty(settings->paths.path_content_video_history)) + strlcpy(settings->paths.directory_content_video_history, "default", sizeof(settings->paths.directory_content_video_history)); + + if (string_is_empty(settings->paths.directory_content_video_history) || string_is_equal(settings->paths.directory_content_video_history, "default")) + fill_pathname_resolve_relative( + settings->paths.path_content_video_history, + path_config, + FILE_PATH_CONTENT_VIDEO_HISTORY, + sizeof(settings->paths.path_content_video_history)); + else + fill_pathname_join( + settings->paths.path_content_video_history, + settings->paths.directory_content_video_history, + FILE_PATH_CONTENT_VIDEO_HISTORY, + sizeof(settings->paths.path_content_video_history)); if (!string_is_empty(settings->paths.directory_screenshot)) { @@ -3285,6 +3318,16 @@ static bool config_load_file(global_t *global, *settings->paths.directory_thumbnails = '\0'; if (string_is_equal(settings->paths.directory_playlist, "default")) *settings->paths.directory_playlist = '\0'; + if (string_is_equal(settings->paths.directory_content_favorites, "default")) + *settings->paths.directory_content_favorites = '\0'; + if (string_is_equal(settings->paths.directory_content_history, "default")) + *settings->paths.directory_content_history = '\0'; + if (string_is_equal(settings->paths.directory_content_image_history, "default")) + *settings->paths.directory_content_image_history = '\0'; + if (string_is_equal(settings->paths.directory_content_music_history, "default")) + *settings->paths.directory_content_music_history = '\0'; + if (string_is_equal(settings->paths.directory_content_video_history, "default")) + *settings->paths.directory_content_video_history = '\0'; if (string_is_equal(settings->paths.directory_runtime_log, "default")) *settings->paths.directory_runtime_log = '\0'; #ifdef HAVE_MENU diff --git a/configuration.h b/configuration.h index f98527828d..c62f490396 100644 --- a/configuration.h +++ b/configuration.h @@ -409,10 +409,10 @@ typedef struct settings char path_audio_dsp_plugin[PATH_MAX_LENGTH]; char path_softfilter_plugin[PATH_MAX_LENGTH]; char path_core_options[PATH_MAX_LENGTH]; - char path_content_history[PATH_MAX_LENGTH]; char path_content_favorites[PATH_MAX_LENGTH]; - char path_content_music_history[PATH_MAX_LENGTH]; + char path_content_history[PATH_MAX_LENGTH]; char path_content_image_history[PATH_MAX_LENGTH]; + char path_content_music_history[PATH_MAX_LENGTH]; char path_content_video_history[PATH_MAX_LENGTH]; char path_libretro_info[PATH_MAX_LENGTH]; char path_cheat_settings[PATH_MAX_LENGTH]; @@ -423,8 +423,6 @@ typedef struct settings char directory_autoconfig[PATH_MAX_LENGTH]; char directory_video_filter[PATH_MAX_LENGTH]; char directory_video_shader[PATH_MAX_LENGTH]; - char directory_content_history[PATH_MAX_LENGTH]; - char directory_content_favorites[PATH_MAX_LENGTH]; char directory_libretro[PATH_MAX_LENGTH]; char directory_cursor[PATH_MAX_LENGTH]; char directory_input_remapping[PATH_MAX_LENGTH]; @@ -437,6 +435,11 @@ typedef struct settings char directory_system[PATH_MAX_LENGTH]; char directory_cache[PATH_MAX_LENGTH]; char directory_playlist[PATH_MAX_LENGTH]; + char directory_content_favorites[PATH_MAX_LENGTH]; + char directory_content_history[PATH_MAX_LENGTH]; + char directory_content_image_history[PATH_MAX_LENGTH]; + char directory_content_music_history[PATH_MAX_LENGTH]; + char directory_content_video_history[PATH_MAX_LENGTH]; char directory_runtime_log[PATH_MAX_LENGTH]; char directory_core_assets[PATH_MAX_LENGTH]; char directory_assets[PATH_MAX_LENGTH]; diff --git a/defaults.h b/defaults.h index e01d7ffc02..879c76f6b4 100644 --- a/defaults.h +++ b/defaults.h @@ -49,7 +49,11 @@ enum default_dirs DEFAULT_DIR_SCREENSHOT, DEFAULT_DIR_SYSTEM, DEFAULT_DIR_PLAYLIST, + DEFAULT_DIR_CONTENT_FAVORITES, DEFAULT_DIR_CONTENT_HISTORY, + DEFAULT_DIR_CONTENT_IMAGE_HISTORY, + DEFAULT_DIR_CONTENT_MUSIC_HISTORY, + DEFAULT_DIR_CONTENT_VIDEO_HISTORY, DEFAULT_DIR_REMAP, DEFAULT_DIR_CACHE, DEFAULT_DIR_WALLPAPERS, diff --git a/file_path_special.h b/file_path_special.h index 05f2099e49..8ce54e96dd 100644 --- a/file_path_special.h +++ b/file_path_special.h @@ -89,11 +89,11 @@ RETRO_BEGIN_DECLS #define FILE_PATH_CHEATS_ZIP "cheats.zip" #define FILE_PATH_ASSETS_ZIP "assets.zip" #define FILE_PATH_AUTOCONFIG_ZIP "autoconfig.zip" -#define FILE_PATH_CONTENT_HISTORY "content_history.lpl" #define FILE_PATH_CONTENT_FAVORITES "content_favorites.lpl" +#define FILE_PATH_CONTENT_HISTORY "content_history.lpl" +#define FILE_PATH_CONTENT_IMAGE_HISTORY "content_image_history.lpl" #define FILE_PATH_CONTENT_MUSIC_HISTORY "content_music_history.lpl" #define FILE_PATH_CONTENT_VIDEO_HISTORY "content_video_history.lpl" -#define FILE_PATH_CONTENT_IMAGE_HISTORY "content_image_history.lpl" #define FILE_PATH_CORE_OPTIONS_CONFIG "retroarch-core-options.cfg" #define FILE_PATH_MAIN_CONFIG "retroarch.cfg" #define FILE_PATH_SALAMANDER_CONFIG "retroarch-salamander.cfg" diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index f26e404239..d91d92209a 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -2130,6 +2130,26 @@ MSG_HASH( MENU_ENUM_LABEL_PLAYLIST_DIRECTORY, "playlist_directory" ) +MSG_HASH( + MENU_ENUM_LABEL_CONTENT_FAVORITES_DIRECTORY, + "content_favorites_directory" + ) +MSG_HASH( + MENU_ENUM_LABEL_CONTENT_HISTORY_DIRECTORY, + "content_history_directory" + ) +MSG_HASH( + MENU_ENUM_LABEL_CONTENT_IMAGE_HISTORY_DIRECTORY, + "content_image_history_directory" + ) +MSG_HASH( + MENU_ENUM_LABEL_CONTENT_MUSIC_HISTORY_DIRECTORY, + "content_music_history_directory" + ) +MSG_HASH( + MENU_ENUM_LABEL_CONTENT_VIDEO_HISTORY_DIRECTORY, + "content_video_history_directory" + ) MSG_HASH( MENU_ENUM_LABEL_RUNTIME_LOG_DIRECTORY, "runtime_log_directory" diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 3515faf91d..514aed48ae 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -390,6 +390,41 @@ int msg_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) "Save all playlist files to this \n" "directory."); break; + case MENU_ENUM_LABEL_CONTENT_FAVORITES_DIRECTORY: + snprintf(s, len, + "Favorites Playlist Directory. \n" + " \n" + "Save the favorites playlist to this \n" + "directory."); + break; + case MENU_ENUM_LABEL_CONTENT_HISTORY_DIRECTORY: + snprintf(s, len, + "History Playlist Directory. \n" + " \n" + "Save the history playlist to this \n" + "directory."); + break; + case MENU_ENUM_LABEL_CONTENT_IMAGE_HISTORY_DIRECTORY: + snprintf(s, len, + "Images Playlist Directory. \n" + " \n" + "Save the images playlist to this \n" + "directory."); + break; + case MENU_ENUM_LABEL_CONTENT_MUSIC_HISTORY_DIRECTORY: + snprintf(s, len, + "Music Playlist Directory. \n" + " \n" + "Save the music playlist to this \n" + "directory."); + break; + case MENU_ENUM_LABEL_CONTENT_VIDEO_HISTORY_DIRECTORY: + snprintf(s, len, + "Videos Playlist Directory. \n" + " \n" + "Save the videos playlist to this \n" + "directory."); + break; case MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN: snprintf(s, len, "Some cores might have \n" diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index b1aeaf40c3..4a6b1207df 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -5602,6 +5602,46 @@ MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_DIRECTORY, "Save all playlists to this directory." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_DIRECTORY, + "Favorites Playlist" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_DIRECTORY, + "Save the Favorites playlist to this directory." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_HISTORY_DIRECTORY, + "History Playlist" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_HISTORY_DIRECTORY, + "Save the History playlist to this directory." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_IMAGE_HISTORY_DIRECTORY, + "Images Playlist" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_IMAGE_HISTORY_DIRECTORY, + "Save the Images History playlist to this directory." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_MUSIC_HISTORY_DIRECTORY, + "Music Playlist" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_MUSIC_HISTORY_DIRECTORY, + "Save the Music playlist to this directory." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_VIDEO_HISTORY_DIRECTORY, + "Videos Playlist" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_VIDEO_HISTORY_DIRECTORY, + "Save the Videos playlist to this directory." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUNTIME_LOG_DIRECTORY, "Runtime Logs" diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index f8d5d1080b..202dfa67c0 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -2117,9 +2117,9 @@ static int action_ok_playlist_entry_collection(const char *path, settings_t *settings = config_get_ptr(); bool playlist_sort_alphabetical = settings->bools.playlist_sort_alphabetical; const char *path_content_history = settings->paths.path_content_history; + const char *path_content_image_history = settings->paths.path_content_image_history; const char *path_content_music_history = settings->paths.path_content_music_history; const char *path_content_video_history = settings->paths.path_content_video_history; - const char *path_content_image_history = settings->paths.path_content_image_history; playlist_config.capacity = COLLECTION_SIZE; playlist_config.old_format = settings->bools.playlist_use_old_format; @@ -2146,9 +2146,10 @@ static int action_ok_playlist_entry_collection(const char *path, * the same here - otherwise entry_idx may * go out of sync... */ bool is_content_history = string_is_equal(menu->db_playlist_file, path_content_history) || + string_is_equal(menu->db_playlist_file, path_content_image_history) || string_is_equal(menu->db_playlist_file, path_content_music_history) || - string_is_equal(menu->db_playlist_file, path_content_video_history) || - string_is_equal(menu->db_playlist_file, path_content_image_history); + string_is_equal(menu->db_playlist_file, path_content_video_history); + enum playlist_sort_mode current_sort_mode; playlist_config_set_path(&playlist_config, menu->db_playlist_file); diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index b86bf4335a..f9f7008fd7 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -798,6 +798,11 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_directory, DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_info_directory, MENU_ENUM_SUBLABEL_LIBRETRO_INFO_PATH) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_joypad_autoconfig_directory, MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_playlists_directory, MENU_ENUM_SUBLABEL_PLAYLIST_DIRECTORY) +DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_content_favorites_directory, MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_DIRECTORY) +DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_content_history_directory, MENU_ENUM_SUBLABEL_CONTENT_HISTORY_DIRECTORY) +DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_content_image_history_directory, MENU_ENUM_SUBLABEL_CONTENT_IMAGE_HISTORY_DIRECTORY) +DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_content_music_history_directory, MENU_ENUM_SUBLABEL_CONTENT_MUSIC_HISTORY_DIRECTORY) +DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_content_video_history_directory, MENU_ENUM_SUBLABEL_CONTENT_VIDEO_HISTORY_DIRECTORY) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_runtime_log_directory, MENU_ENUM_SUBLABEL_RUNTIME_LOG_DIRECTORY) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_cache_directory, MENU_ENUM_SUBLABEL_CACHE_DIRECTORY) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_database_directory, MENU_ENUM_SUBLABEL_CONTENT_DATABASE_DIRECTORY) @@ -1993,6 +1998,21 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_PLAYLIST_DIRECTORY: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_playlists_directory); break; + case MENU_ENUM_LABEL_CONTENT_FAVORITES_DIRECTORY: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_content_favorites_directory); + break; + case MENU_ENUM_LABEL_CONTENT_HISTORY_DIRECTORY: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_content_history_directory); + break; + case MENU_ENUM_LABEL_CONTENT_IMAGE_HISTORY_DIRECTORY: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_content_image_history_directory); + break; + case MENU_ENUM_LABEL_CONTENT_MUSIC_HISTORY_DIRECTORY: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_content_music_history_directory); + break; + case MENU_ENUM_LABEL_CONTENT_VIDEO_HISTORY_DIRECTORY: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_content_video_history_directory); + break; case MENU_ENUM_LABEL_RUNTIME_LOG_DIRECTORY: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_runtime_log_directory); break; diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index b25a1734d4..a51d00fc47 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -653,6 +653,11 @@ DEFAULT_FILL_TITLE_MACRO(action_get_title_thumbnail_directory, MENU_ENUM_LABE DEFAULT_FILL_TITLE_MACRO(action_get_title_input_remapping_directory, MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY) DEFAULT_FILL_TITLE_MACRO(action_get_title_autoconfig_directory, MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR ) DEFAULT_FILL_TITLE_MACRO(action_get_title_playlist_directory, MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY) +DEFAULT_FILL_TITLE_MACRO(action_get_title_content_favorites_directory, MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_DIRECTORY) +DEFAULT_FILL_TITLE_MACRO(action_get_title_content_history_directory, MENU_ENUM_LABEL_VALUE_CONTENT_HISTORY_DIRECTORY) +DEFAULT_FILL_TITLE_MACRO(action_get_title_content_image_history_directory, MENU_ENUM_LABEL_VALUE_CONTENT_IMAGE_HISTORY_DIRECTORY) +DEFAULT_FILL_TITLE_MACRO(action_get_title_content_music_history_directory, MENU_ENUM_LABEL_VALUE_CONTENT_MUSIC_HISTORY_DIRECTORY) +DEFAULT_FILL_TITLE_MACRO(action_get_title_content_video_history_directory, MENU_ENUM_LABEL_VALUE_CONTENT_VIDEO_HISTORY_DIRECTORY) DEFAULT_FILL_TITLE_MACRO(action_get_title_runtime_log_directory, MENU_ENUM_LABEL_VALUE_RUNTIME_LOG_DIRECTORY) DEFAULT_FILL_TITLE_MACRO(action_get_title_browser_directory, MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY) DEFAULT_FILL_TITLE_MACRO(action_get_title_content_directory, MENU_ENUM_LABEL_VALUE_CONTENT_DIR) @@ -995,6 +1000,16 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs, action_get_title_browser_directory}, {MENU_ENUM_LABEL_PLAYLIST_DIRECTORY, action_get_title_playlist_directory}, + {MENU_ENUM_LABEL_CONTENT_FAVORITES_DIRECTORY, + action_get_title_content_favorites_directory}, + {MENU_ENUM_LABEL_CONTENT_HISTORY_DIRECTORY, + action_get_title_content_history_directory}, + {MENU_ENUM_LABEL_CONTENT_IMAGE_HISTORY_DIRECTORY, + action_get_title_content_image_history_directory}, + {MENU_ENUM_LABEL_CONTENT_MUSIC_HISTORY_DIRECTORY, + action_get_title_content_music_history_directory}, + {MENU_ENUM_LABEL_CONTENT_VIDEO_HISTORY_DIRECTORY, + action_get_title_content_video_history_directory}, {MENU_ENUM_LABEL_RUNTIME_LOG_DIRECTORY, action_get_title_runtime_log_directory}, {MENU_ENUM_LABEL_CONTENT_DIRECTORY, @@ -1265,6 +1280,21 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_PLAYLIST_DIRECTORY: BIND_ACTION_GET_TITLE(cbs, action_get_title_playlist_directory); break; + case MENU_ENUM_LABEL_CONTENT_FAVORITES_DIRECTORY: + BIND_ACTION_GET_TITLE(cbs, action_get_title_content_favorites_directory); + break; + case MENU_ENUM_LABEL_CONTENT_HISTORY_DIRECTORY: + BIND_ACTION_GET_TITLE(cbs, action_get_title_content_history_directory); + break; + case MENU_ENUM_LABEL_CONTENT_IMAGE_HISTORY_DIRECTORY: + BIND_ACTION_GET_TITLE(cbs, action_get_title_content_image_history_directory); + break; + case MENU_ENUM_LABEL_CONTENT_MUSIC_HISTORY_DIRECTORY: + BIND_ACTION_GET_TITLE(cbs, action_get_title_content_music_history_directory); + break; + case MENU_ENUM_LABEL_CONTENT_VIDEO_HISTORY_DIRECTORY: + BIND_ACTION_GET_TITLE(cbs, action_get_title_content_video_history_directory); + break; case MENU_ENUM_LABEL_RUNTIME_LOG_DIRECTORY: BIND_ACTION_GET_TITLE(cbs, action_get_title_runtime_log_directory); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 0b8565f1f0..01e8e01365 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -8508,44 +8508,49 @@ unsigned menu_displaylist_build_list( case DISPLAYLIST_DIRECTORY_SETTINGS_LIST: { menu_displaylist_build_info_t build_list[] = { - {MENU_ENUM_LABEL_SYSTEM_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_CORE_ASSETS_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_ASSETS_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_RGUI_BROWSER_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_RGUI_CONFIG_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_LIBRETRO_DIR_PATH, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_LIBRETRO_INFO_PATH, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_CURSOR_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_SYSTEM_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_CORE_ASSETS_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_ASSETS_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_RGUI_BROWSER_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_RGUI_CONFIG_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_LIBRETRO_DIR_PATH, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_LIBRETRO_INFO_PATH, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_CURSOR_DIRECTORY, PARSE_ONLY_DIR}, #ifdef HAVE_CHEATS - {MENU_ENUM_LABEL_CHEAT_DATABASE_PATH, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_CHEAT_DATABASE_PATH, PARSE_ONLY_DIR}, #endif #ifdef HAVE_VIDEO_FILTER - {MENU_ENUM_LABEL_VIDEO_FILTER_DIR, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_VIDEO_FILTER_DIR, PARSE_ONLY_DIR}, #endif #ifdef HAVE_DSP_FILTER - {MENU_ENUM_LABEL_AUDIO_FILTER_DIR, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_AUDIO_FILTER_DIR, PARSE_ONLY_DIR}, #endif - {MENU_ENUM_LABEL_VIDEO_SHADER_DIR, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_RECORDING_OUTPUT_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_RECORDING_CONFIG_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_OVERLAY_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_VIDEO_SHADER_DIR, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_RECORDING_OUTPUT_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_RECORDING_CONFIG_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_OVERLAY_DIRECTORY, PARSE_ONLY_DIR}, #ifdef HAVE_VIDEO_LAYOUT - {MENU_ENUM_LABEL_VIDEO_LAYOUT_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_VIDEO_LAYOUT_DIRECTORY, PARSE_ONLY_DIR}, #endif #ifdef HAVE_SCREENSHOTS - {MENU_ENUM_LABEL_SCREENSHOT_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_SCREENSHOT_DIRECTORY, PARSE_ONLY_DIR}, #endif - {MENU_ENUM_LABEL_JOYPAD_AUTOCONFIG_DIR, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_INPUT_REMAPPING_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_PLAYLIST_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_RUNTIME_LOG_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_SAVEFILE_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_SAVESTATE_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_CACHE_DIRECTORY, PARSE_ONLY_DIR}, - {MENU_ENUM_LABEL_LOG_DIR, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_JOYPAD_AUTOCONFIG_DIR, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_INPUT_REMAPPING_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_PLAYLIST_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_CONTENT_FAVORITES_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_CONTENT_HISTORY_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_CONTENT_IMAGE_HISTORY_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_CONTENT_MUSIC_HISTORY_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_CONTENT_VIDEO_HISTORY_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_RUNTIME_LOG_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_SAVEFILE_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_SAVESTATE_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_CACHE_DIRECTORY, PARSE_ONLY_DIR}, + {MENU_ENUM_LABEL_LOG_DIR, PARSE_ONLY_DIR}, }; for (i = 0; i < ARRAY_SIZE(build_list); i++) diff --git a/menu/menu_setting.c b/menu/menu_setting.c index cb51a917a2..514f60e052 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -18696,6 +18696,81 @@ static bool setting_append_list( general_read_handler); (*list)[list_info->index - 1].action_start = directory_action_start_generic; + CONFIG_DIR( + list, list_info, + settings->paths.directory_content_favorites, + sizeof(settings->paths.directory_content_favorites), + MENU_ENUM_LABEL_CONTENT_FAVORITES_DIRECTORY, + MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_DIRECTORY, + g_defaults.dirs[DEFAULT_DIR_CONTENT_FAVORITES], + MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + (*list)[list_info->index - 1].action_start = directory_action_start_generic; + + CONFIG_DIR( + list, list_info, + settings->paths.directory_content_history, + sizeof(settings->paths.directory_content_history), + MENU_ENUM_LABEL_CONTENT_HISTORY_DIRECTORY, + MENU_ENUM_LABEL_VALUE_CONTENT_HISTORY_DIRECTORY, + g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY], + MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + (*list)[list_info->index - 1].action_start = directory_action_start_generic; + + CONFIG_DIR( + list, list_info, + settings->paths.directory_content_image_history, + sizeof(settings->paths.directory_content_image_history), + MENU_ENUM_LABEL_CONTENT_IMAGE_HISTORY_DIRECTORY, + MENU_ENUM_LABEL_VALUE_CONTENT_IMAGE_HISTORY_DIRECTORY, + g_defaults.dirs[DEFAULT_DIR_CONTENT_IMAGE_HISTORY], + MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + (*list)[list_info->index - 1].action_start = directory_action_start_generic; + + CONFIG_DIR( + list, list_info, + settings->paths.directory_content_music_history, + sizeof(settings->paths.directory_content_music_history), + MENU_ENUM_LABEL_CONTENT_MUSIC_HISTORY_DIRECTORY, + MENU_ENUM_LABEL_VALUE_CONTENT_MUSIC_HISTORY_DIRECTORY, + g_defaults.dirs[DEFAULT_DIR_CONTENT_MUSIC_HISTORY], + MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + (*list)[list_info->index - 1].action_start = directory_action_start_generic; + + CONFIG_DIR( + list, list_info, + settings->paths.directory_content_video_history, + sizeof(settings->paths.directory_content_video_history), + MENU_ENUM_LABEL_CONTENT_VIDEO_HISTORY_DIRECTORY, + MENU_ENUM_LABEL_VALUE_CONTENT_VIDEO_HISTORY_DIRECTORY, + g_defaults.dirs[DEFAULT_DIR_CONTENT_VIDEO_HISTORY], + MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + (*list)[list_info->index - 1].action_start = directory_action_start_generic; + CONFIG_DIR( list, list_info, settings->paths.directory_runtime_log, diff --git a/msg_hash.h b/msg_hash.h index 349b5ee61a..0f13963993 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -2227,6 +2227,11 @@ enum msg_hash_enums MENU_LABEL(RGUI_BROWSER_DIRECTORY), MENU_LABEL(CONTENT_DATABASE_DIRECTORY), MENU_LABEL(PLAYLIST_DIRECTORY), + MENU_LABEL(CONTENT_FAVORITES_DIRECTORY), + MENU_LABEL(CONTENT_HISTORY_DIRECTORY), + MENU_LABEL(CONTENT_IMAGE_HISTORY_DIRECTORY), + MENU_LABEL(CONTENT_MUSIC_HISTORY_DIRECTORY), + MENU_LABEL(CONTENT_VIDEO_HISTORY_DIRECTORY), MENU_LABEL(RUNTIME_LOG_DIRECTORY), MENU_LABEL(CORE_ASSETS_DIRECTORY), MENU_LABEL(SCREENSHOT_DIRECTORY),