overlay: don't rely on menu entry, it can be misleading (#17247)

This commit is contained in:
Eric Warmenhoven 2024-12-11 01:32:15 -05:00 committed by GitHub
parent 722fdd925e
commit cf986c0424
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5265,26 +5265,6 @@ static const char *input_overlay_path(bool want_osk)
/* try based on the playlist entry first */
if (playlist)
{
#ifdef HAVE_MENU
menu_handle_t *menu = menu_state_get_ptr()->driver_data;
if (menu)
{
const char *playlist_db_name = NULL;
playlist_get_db_name(playlist, menu->rpl_entry_selection_ptr, &playlist_db_name);
if (playlist_db_name)
{
size_t _len = fill_pathname_join_special_ext(system_overlay_path,
overlay_directory, SYSTEM_OVERLAY_DIR, playlist_db_name, "",
sizeof(system_overlay_path));
char *ext = path_get_extension_mutable(system_overlay_path);
if (!ext)
ext = system_overlay_path + _len;
strlcpy(ext, ".cfg", 5);
if (path_is_valid(system_overlay_path))
return system_overlay_path;
}
}
#endif
if (!string_is_empty(content_path))
{
const struct playlist_entry *entry;