mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(PS3) Playlists and history lists should save now again;
(HAVE_DYNAMIC not defined) libretro_path should get read from config file to prevent instance where settings->path.libretro is empty, which lead to history not being able to be pushed to (History/Playlists) If we don't have core info files and core_name is therefore blank, we should attempt a fallback path so that it infers the name from the core basename instead
This commit is contained in:
parent
c83c34f30a
commit
1ebeeeb725
@ -1664,6 +1664,13 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
*settings->path.libretro = '\0';
|
||||
}
|
||||
|
||||
if (config_get_path(conf, "libretro_path", tmp_str, sizeof(tmp_str)))
|
||||
{
|
||||
#ifndef HAVE_DYNAMIC
|
||||
strlcpy(settings->path.libretro, tmp_str, sizeof(settings->path.libretro));
|
||||
#endif
|
||||
}
|
||||
|
||||
if (config_get_path(conf, "resampler_directory", tmp_str, sizeof(tmp_str)))
|
||||
strlcpy(settings->directory.resampler, tmp_str, sizeof(settings->directory.resampler));
|
||||
|
||||
|
@ -209,6 +209,8 @@ static void frontend_ps3_get_environment_settings(int *argc, char *argv[],
|
||||
RARCH_LOG("usrDirPath : [%s].\n", g_defaults.dir.port);
|
||||
}
|
||||
|
||||
strlcpy(g_defaults.dir.content_history,
|
||||
g_defaults.dir.port, sizeof(g_defaults.dir.content_history));
|
||||
fill_pathname_join(g_defaults.dir.core, g_defaults.dir.port,
|
||||
"cores", sizeof(g_defaults.dir.core));
|
||||
fill_pathname_join(g_defaults.dir.core_info, g_defaults.dir.port,
|
||||
|
20
playlist.c
20
playlist.c
@ -231,10 +231,22 @@ void playlist_push(playlist_t *playlist,
|
||||
|
||||
if (string_is_empty(core_path) || string_is_empty(core_name))
|
||||
{
|
||||
RARCH_ERR("cannot push NULL or empty core info into the playlist.\n");
|
||||
RARCH_ERR("core_name: %s.\n", string_is_empty(core_name) ? "N/A" : core_name);
|
||||
RARCH_ERR("core_path: %s.\n", string_is_empty(core_path) ? "N/A" : core_path);
|
||||
return;
|
||||
if (string_is_empty(core_name) && !string_is_empty(core_path))
|
||||
{
|
||||
static char base_path[PATH_MAX_LENGTH] = {0};
|
||||
fill_pathname_base_noext(base_path, core_path, sizeof(base_path));
|
||||
core_name = base_path;
|
||||
RARCH_LOG("core_name is now: %s\n", core_name);
|
||||
}
|
||||
|
||||
RARCH_LOG("core_name: %s.\n", string_is_empty(core_name) ? "N/A" : core_name);
|
||||
RARCH_LOG("core_path: %s.\n", string_is_empty(core_path) ? "N/A" : core_path);
|
||||
|
||||
if (string_is_empty(core_path) || string_is_empty(core_name))
|
||||
{
|
||||
RARCH_ERR("cannot push NULL or empty core name into the playlist.\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (string_is_empty(path))
|
||||
|
Loading…
x
Reference in New Issue
Block a user