mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Fix launching of playlist content assigned to 'built-in' cores
This commit is contained in:
parent
e7082d3e5b
commit
ba6e53c2e4
@ -2034,6 +2034,7 @@ static int action_ok_playlist_entry_collection(const char *path,
|
|||||||
playlist_t *tmp_playlist = NULL;
|
playlist_t *tmp_playlist = NULL;
|
||||||
const struct playlist_entry *entry = NULL;
|
const struct playlist_entry *entry = NULL;
|
||||||
core_info_t* core_info = NULL;
|
core_info_t* core_info = NULL;
|
||||||
|
bool core_is_builtin = false;
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
bool playlist_use_old_format = settings->bools.playlist_use_old_format;
|
bool playlist_use_old_format = settings->bools.playlist_use_old_format;
|
||||||
@ -2144,23 +2145,35 @@ static int action_ok_playlist_entry_collection(const char *path,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Entry does have a core assignment - ensure
|
/* Entry does have a core assignment
|
||||||
* it has corresponding core info entry */
|
* > If core is 'built-in' (imageviewer, etc.),
|
||||||
core_info = playlist_entry_get_core_info(entry);
|
* then copy the path without modification
|
||||||
|
* > If this is a standard core, ensure
|
||||||
if (core_info && !string_is_empty(core_info->path))
|
* it has a corresponding core info entry */
|
||||||
strlcpy(core_path, core_info->path, sizeof(core_path));
|
if (string_is_equal(entry->core_path, "builtin"))
|
||||||
|
{
|
||||||
|
strlcpy(core_path, entry->core_path, sizeof(core_path));
|
||||||
|
core_is_builtin = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Core path is invalid - just copy what we have
|
core_info = playlist_entry_get_core_info(entry);
|
||||||
* and hope for the best... */
|
|
||||||
strlcpy(core_path, entry->core_path, sizeof(core_path));
|
if (core_info && !string_is_empty(core_info->path))
|
||||||
playlist_resolve_path(PLAYLIST_LOAD, core_path, sizeof(core_path));
|
strlcpy(core_path, core_info->path, sizeof(core_path));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Core path is invalid - just copy what we have
|
||||||
|
* and hope for the best... */
|
||||||
|
strlcpy(core_path, entry->core_path, sizeof(core_path));
|
||||||
|
playlist_resolve_path(PLAYLIST_LOAD, core_path, sizeof(core_path));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure core path is valid */
|
/* Ensure core path is valid */
|
||||||
if (string_is_empty(core_path) || !path_is_valid(core_path))
|
if (string_is_empty(core_path) ||
|
||||||
|
(!core_is_builtin && !path_is_valid(core_path)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* Subsystem codepath */
|
/* Subsystem codepath */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user