mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-11 12:35:08 +00:00
Add new path settings for music/image/video history paths
This commit is contained in:
parent
04c9db254e
commit
f391c1b65d
@ -760,6 +760,9 @@ static void config_set_defaults(void)
|
|||||||
|
|
||||||
*settings->path.core_options = '\0';
|
*settings->path.core_options = '\0';
|
||||||
*settings->path.content_history = '\0';
|
*settings->path.content_history = '\0';
|
||||||
|
*settings->path.content_music_history = '\0';
|
||||||
|
*settings->path.content_image_history = '\0';
|
||||||
|
*settings->path.content_video_history = '\0';
|
||||||
*settings->path.cheat_settings = '\0';
|
*settings->path.cheat_settings = '\0';
|
||||||
*settings->path.shader = '\0';
|
*settings->path.shader = '\0';
|
||||||
#ifndef IOS
|
#ifndef IOS
|
||||||
@ -1737,6 +1740,15 @@ static bool config_load_file(const char *path, bool set_defaults)
|
|||||||
if (config_get_path(conf, "content_history_path", tmp_str, sizeof(tmp_str)))
|
if (config_get_path(conf, "content_history_path", tmp_str, sizeof(tmp_str)))
|
||||||
strlcpy(settings->path.content_history, tmp_str, sizeof(settings->path.content_history));
|
strlcpy(settings->path.content_history, tmp_str, sizeof(settings->path.content_history));
|
||||||
|
|
||||||
|
if (config_get_path(conf, "content_music_history_path", tmp_str, sizeof(tmp_str)))
|
||||||
|
strlcpy(settings->path.content_music_history, tmp_str, sizeof(settings->path.content_music_history));
|
||||||
|
|
||||||
|
if (config_get_path(conf, "content_image_history_path", tmp_str, sizeof(tmp_str)))
|
||||||
|
strlcpy(settings->path.content_image_history, tmp_str, sizeof(settings->path.content_image_history));
|
||||||
|
|
||||||
|
if (config_get_path(conf, "content_video_history_path", tmp_str, sizeof(tmp_str)))
|
||||||
|
strlcpy(settings->path.content_video_history, tmp_str, sizeof(settings->path.content_video_history));
|
||||||
|
|
||||||
if (config_get_path(conf, "resampler_directory", tmp_str, sizeof(tmp_str)))
|
if (config_get_path(conf, "resampler_directory", tmp_str, sizeof(tmp_str)))
|
||||||
strlcpy(settings->directory.resampler, tmp_str, sizeof(settings->directory.resampler));
|
strlcpy(settings->directory.resampler, tmp_str, sizeof(settings->directory.resampler));
|
||||||
|
|
||||||
@ -1844,7 +1856,62 @@ static bool config_load_file(const char *path, bool set_defaults)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (string_is_empty(settings->path.content_music_history))
|
||||||
|
{
|
||||||
|
if (string_is_empty(settings->directory.content_history))
|
||||||
|
{
|
||||||
|
fill_pathname_resolve_relative(
|
||||||
|
settings->path.content_music_history,
|
||||||
|
global->path.config,
|
||||||
|
file_path_str(FILE_PATH_CONTENT_MUSIC_HISTORY),
|
||||||
|
sizeof(settings->path.content_music_history));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fill_pathname_join(settings->path.content_music_history,
|
||||||
|
settings->directory.content_history,
|
||||||
|
file_path_str(FILE_PATH_CONTENT_MUSIC_HISTORY),
|
||||||
|
sizeof(settings->path.content_music_history));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string_is_empty(settings->path.content_video_history))
|
||||||
|
{
|
||||||
|
if (string_is_empty(settings->directory.content_history))
|
||||||
|
{
|
||||||
|
fill_pathname_resolve_relative(
|
||||||
|
settings->path.content_video_history,
|
||||||
|
global->path.config,
|
||||||
|
file_path_str(FILE_PATH_CONTENT_VIDEO_HISTORY),
|
||||||
|
sizeof(settings->path.content_video_history));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fill_pathname_join(settings->path.content_video_history,
|
||||||
|
settings->directory.content_history,
|
||||||
|
file_path_str(FILE_PATH_CONTENT_VIDEO_HISTORY),
|
||||||
|
sizeof(settings->path.content_video_history));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string_is_empty(settings->path.content_image_history))
|
||||||
|
{
|
||||||
|
if (string_is_empty(settings->directory.content_history))
|
||||||
|
{
|
||||||
|
fill_pathname_resolve_relative(
|
||||||
|
settings->path.content_image_history,
|
||||||
|
global->path.config,
|
||||||
|
file_path_str(FILE_PATH_CONTENT_IMAGE_HISTORY),
|
||||||
|
sizeof(settings->path.content_image_history));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fill_pathname_join(settings->path.content_image_history,
|
||||||
|
settings->directory.content_history,
|
||||||
|
file_path_str(FILE_PATH_CONTENT_IMAGE_HISTORY),
|
||||||
|
sizeof(settings->path.content_image_history));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!string_is_empty(settings->directory.screenshot))
|
if (!string_is_empty(settings->directory.screenshot))
|
||||||
@ -2808,6 +2875,12 @@ bool config_save_file(const char *path)
|
|||||||
#endif
|
#endif
|
||||||
{ "content_history_path", false,
|
{ "content_history_path", false,
|
||||||
settings->path.content_history},
|
settings->path.content_history},
|
||||||
|
{ "content_music_history_path", false,
|
||||||
|
settings->path.content_music_history},
|
||||||
|
{ "content_video_history_path", false,
|
||||||
|
settings->path.content_video_history},
|
||||||
|
{ "content_image_history_path", false,
|
||||||
|
settings->path.content_image_history},
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
{ "input_overlay", false,
|
{ "input_overlay", false,
|
||||||
settings->path.overlay},
|
settings->path.overlay},
|
||||||
|
@ -393,6 +393,9 @@ typedef struct settings
|
|||||||
char softfilter_plugin[PATH_MAX_LENGTH];
|
char softfilter_plugin[PATH_MAX_LENGTH];
|
||||||
char core_options[PATH_MAX_LENGTH];
|
char core_options[PATH_MAX_LENGTH];
|
||||||
char content_history[PATH_MAX_LENGTH];
|
char content_history[PATH_MAX_LENGTH];
|
||||||
|
char content_music_history[PATH_MAX_LENGTH];
|
||||||
|
char content_image_history[PATH_MAX_LENGTH];
|
||||||
|
char content_video_history[PATH_MAX_LENGTH];
|
||||||
char libretro_info[PATH_MAX_LENGTH];
|
char libretro_info[PATH_MAX_LENGTH];
|
||||||
char cheat_settings[PATH_MAX_LENGTH];
|
char cheat_settings[PATH_MAX_LENGTH];
|
||||||
char bundle_assets_src[PATH_MAX_LENGTH];
|
char bundle_assets_src[PATH_MAX_LENGTH];
|
||||||
|
@ -34,6 +34,9 @@ enum file_path_enum
|
|||||||
FILE_PATH_LOG_ERROR,
|
FILE_PATH_LOG_ERROR,
|
||||||
FILE_PATH_LOG_INFO,
|
FILE_PATH_LOG_INFO,
|
||||||
FILE_PATH_CONTENT_HISTORY,
|
FILE_PATH_CONTENT_HISTORY,
|
||||||
|
FILE_PATH_CONTENT_MUSIC_HISTORY,
|
||||||
|
FILE_PATH_CONTENT_VIDEO_HISTORY,
|
||||||
|
FILE_PATH_CONTENT_IMAGE_HISTORY,
|
||||||
FILE_PATH_BACKGROUND_IMAGE,
|
FILE_PATH_BACKGROUND_IMAGE,
|
||||||
FILE_PATH_TTF_FONT,
|
FILE_PATH_TTF_FONT,
|
||||||
FILE_PATH_MAIN_CONFIG,
|
FILE_PATH_MAIN_CONFIG,
|
||||||
|
@ -119,6 +119,12 @@ const char *file_path_str(enum file_path_enum enum_idx)
|
|||||||
return "autoconfig.zip";
|
return "autoconfig.zip";
|
||||||
case FILE_PATH_CONTENT_HISTORY:
|
case FILE_PATH_CONTENT_HISTORY:
|
||||||
return "content_history.lpl";
|
return "content_history.lpl";
|
||||||
|
case FILE_PATH_CONTENT_MUSIC_HISTORY:
|
||||||
|
return "content_music_history.lpl";
|
||||||
|
case FILE_PATH_CONTENT_VIDEO_HISTORY:
|
||||||
|
return "content_video_history.lpl";
|
||||||
|
case FILE_PATH_CONTENT_IMAGE_HISTORY:
|
||||||
|
return "content_image_history.lpl";
|
||||||
case FILE_PATH_CORE_OPTIONS_CONFIG:
|
case FILE_PATH_CORE_OPTIONS_CONFIG:
|
||||||
return "retroarch-core-options.cfg";
|
return "retroarch-core-options.cfg";
|
||||||
case FILE_PATH_MAIN_CONFIG:
|
case FILE_PATH_MAIN_CONFIG:
|
||||||
|
@ -62,11 +62,26 @@
|
|||||||
# A default path will be assigned if not set.
|
# A default path will be assigned if not set.
|
||||||
# core_options_path =
|
# core_options_path =
|
||||||
|
|
||||||
# Path to content load history file.
|
# Path to content history file.
|
||||||
# RetroArch keeps track of all content loaded in the menu and from CLI directly for convenient quick loading.
|
# RetroArch keeps track of all content loaded in the menu and from CLI directly for convenient quick loading.
|
||||||
# A default path will be assigned if not set.
|
# A default path will be assigned if not set.
|
||||||
# content_history_path =
|
# content_history_path =
|
||||||
|
|
||||||
|
# Path to music content history file (optional).
|
||||||
|
# RetroArch keeps track of all music content loaded in the menu and from CLI directly for convenient quick loading.
|
||||||
|
# A default path will be assigned if not set.
|
||||||
|
# content_music_history_path =
|
||||||
|
|
||||||
|
# Path to image content history file (optional).
|
||||||
|
# RetroArch keeps track of all image content loaded in the menu and from CLI directly for convenient quick loading.
|
||||||
|
# A default path will be assigned if not set.
|
||||||
|
# content_image_history_path =
|
||||||
|
|
||||||
|
# Path to video content history file (optional).
|
||||||
|
# RetroArch keeps track of all video content loaded in the menu and from CLI directly for convenient quick loading.
|
||||||
|
# A default path will be assigned if not set.
|
||||||
|
# content_video_history_path =
|
||||||
|
|
||||||
# Number of entries that will be kept in content history file.
|
# Number of entries that will be kept in content history file.
|
||||||
# content_history_size = 100
|
# content_history_size = 100
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user