mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-12 20:58:18 +00:00
Start adding playlist_names and playlist_cores to config file
This commit is contained in:
parent
9025fbfe45
commit
990ee7a105
@ -694,6 +694,8 @@ static void config_set_defaults(void)
|
||||
*global->record.config_dir = '\0';
|
||||
|
||||
*settings->bundle_assets_last_extracted_version = '\0';
|
||||
*settings->playlist_names = '\0';
|
||||
*settings->playlist_cores = '\0';
|
||||
*settings->core_options_path = '\0';
|
||||
*settings->content_history_path = '\0';
|
||||
*settings->content_history_directory = '\0';
|
||||
@ -1247,6 +1249,8 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, bundle_assets_extract_enable, "bundle_assets_extract_enable");
|
||||
CONFIG_GET_PATH_BASE(conf, settings, bundle_assets_last_extracted_version, "bundle_assets_last_extracted_version");
|
||||
CONFIG_GET_STRING_BASE(conf, settings, playlist_names, "playlist_names");
|
||||
CONFIG_GET_STRING_BASE(conf, settings, playlist_cores, "playlist_cores");
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, video.windowed_fullscreen, "video_windowed_fullscreen");
|
||||
CONFIG_GET_INT_BASE (conf, settings, video.monitor_index, "video_monitor_index");
|
||||
@ -2498,6 +2502,8 @@ bool config_save_file(const char *path)
|
||||
config_set_bool(conf, "video_fullscreen", settings->video.fullscreen);
|
||||
config_set_bool(conf, "bundle_assets_extract_enable", settings->bundle_assets_extract_enable);
|
||||
config_set_string(conf, "bundle_assets_last_extracted_version", settings->bundle_assets_last_extracted_version);
|
||||
config_set_string(conf, "playlist_names", settings->playlist_names);
|
||||
config_set_string(conf, "playlist_cores", settings->playlist_cores);
|
||||
config_set_float(conf, "video_refresh_rate", settings->video.refresh_rate);
|
||||
config_set_int(conf, "video_monitor_index",
|
||||
settings->video.monitor_index);
|
||||
|
@ -35,6 +35,9 @@ typedef struct settings
|
||||
{
|
||||
video_viewport_t video_viewport_custom;
|
||||
|
||||
char playlist_names[PATH_MAX_LENGTH];
|
||||
char playlist_cores[PATH_MAX_LENGTH];
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
|
@ -2465,9 +2465,17 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
menu_hash_to_str(MENU_LABEL_CONTENT_HISTORY_SIZE), PARSE_ONLY_UINT, false);
|
||||
{
|
||||
struct string_list *str_list = dir_list_new_special(settings->playlist_directory, DIR_LIST_COLLECTIONS, NULL);
|
||||
RARCH_LOG("Gets here?\n");
|
||||
if (str_list && str_list->size)
|
||||
{
|
||||
unsigned i;
|
||||
char new_playlist_names[PATH_MAX_LENGTH];
|
||||
union string_list_elem_attr attr = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct string_list *str_list2 = NULL;
|
||||
|
||||
if (settings->playlist_names[0] == '\0' && settings->playlist_cores[0] == '\0')
|
||||
str_list2 = string_split(info->label, ";");
|
||||
|
||||
for (i = 0; i < str_list->size; i++)
|
||||
{
|
||||
@ -2476,12 +2484,17 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
|
||||
strlcpy(path_base, path, sizeof(path_base));
|
||||
|
||||
strlcat(new_playlist_names, path_base, sizeof(new_playlist_names));
|
||||
strlcat(new_playlist_names, ";", sizeof(new_playlist_names));
|
||||
|
||||
path_remove_extension(path_base);
|
||||
menu_entries_push(info->list,
|
||||
path_base,
|
||||
str_list->elems[i].data, MENU_SETTINGS_PLAYLIST_ASSOCIATION_START + i, 0, 0);
|
||||
}
|
||||
string_list_free(str_list);
|
||||
|
||||
strlcpy(settings->playlist_names, new_playlist_names, sizeof(settings->playlist_names));
|
||||
string_list_free(str_list2);
|
||||
}
|
||||
}
|
||||
info->need_push = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user