diff --git a/general.h b/general.h index 7a31059c90..e14b7f3a41 100644 --- a/general.h +++ b/general.h @@ -400,6 +400,7 @@ struct settings char libretro_directory[PATH_MAX]; unsigned libretro_log_level; char libretro_info_path[PATH_MAX]; + char content_database[PATH_MAX]; char cheat_database[PATH_MAX]; char cheat_settings_path[PATH_MAX]; diff --git a/menu/menu_common.c b/menu/menu_common.c index 1cf43f3058..b8c069585c 100644 --- a/menu/menu_common.c +++ b/menu/menu_common.c @@ -466,6 +466,7 @@ unsigned menu_common_type_is(const char *label, unsigned type) !strcmp(label, "rgui_browser_directory") || !strcmp(label, "content_directory") || !strcmp(label, "assets_directory") || + !strcmp(label, "content_database_path") || !strcmp(label, "cheat_database_path") || !strcmp(label, "video_shader_dir") || !strcmp(label, "video_filter_dir") || diff --git a/retroarch.cfg b/retroarch.cfg index 1a4e0c9569..c641204b20 100644 --- a/retroarch.cfg +++ b/retroarch.cfg @@ -624,6 +624,9 @@ # The interval is measured in seconds. A value of 0 disables autosave. # autosave_interval = +# Path to content database directory. +# content_database_path = + # Path to cheat database directory. # cheat_database_path = diff --git a/settings.c b/settings.c index 04422e9af4..c5e4ded1f8 100644 --- a/settings.c +++ b/settings.c @@ -508,6 +508,7 @@ static void config_set_defaults(void) *g_settings.core_options_path = '\0'; *g_settings.content_history_path = '\0'; *g_settings.content_history_directory = '\0'; + *g_settings.content_database = '\0'; *g_settings.cheat_database = '\0'; *g_settings.cheat_settings_path = '\0'; *g_settings.resampler_directory = '\0'; @@ -1150,6 +1151,7 @@ static bool config_load_file(const char *path, bool set_defaults) CONFIG_GET_BOOL(pause_nonactive, "pause_nonactive"); CONFIG_GET_INT(autosave_interval, "autosave_interval"); + CONFIG_GET_PATH(content_database, "content_database_path"); CONFIG_GET_PATH(cheat_database, "cheat_database_path"); CONFIG_GET_PATH(cheat_settings_path, "cheat_settings_path"); @@ -1583,6 +1585,7 @@ bool config_save_file(const char *path) config_set_path(conf, "libretro_path", g_settings.libretro); config_set_path(conf, "libretro_directory", g_settings.libretro_directory); config_set_path(conf, "libretro_info_path", g_settings.libretro_info_path); + config_set_path(conf, "content_database_path", g_settings.content_database); config_set_path(conf, "cheat_database_path", g_settings.cheat_database); config_set_path(conf, "content_history_dir", g_settings.content_history_directory); config_set_bool(conf, "rewind_enable", g_settings.rewind_enable); diff --git a/settings_data.c b/settings_data.c index 554b8ff104..8c308640da 100644 --- a/settings_data.c +++ b/settings_data.c @@ -5140,16 +5140,20 @@ static bool setting_data_append_list_path_options( list_info, SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR); - CONFIG_PATH( - g_settings.core_options_path, - "core_options_path", - "Core Options Path", + CONFIG_DIR( + g_settings.content_database, + "content_database_path", + "Content Database Directory", "", - "Paths", + "", + group_info.name, subgroup_info.name, general_write_handler, general_read_handler); - settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY); + settings_data_list_current_add_flags( + list, + list_info, + SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR); CONFIG_DIR( g_settings.cheat_database,