Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions menu/drivers/ozone.c
Original file line number Diff line number Diff line change
Expand Up @@ -1980,8 +1980,6 @@ static uintptr_t ozone_entries_icon_get_texture(
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CORE];
case MENU_ENUM_LABEL_CORE_INFORMATION:
case MENU_ENUM_LABEL_DEFERRED_CORE_INFORMATION_LIST:
if (!string_is_equal(enum_path, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_INFORMATION)))
return 0;
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CORE];
case MENU_ENUM_LABEL_CORE_INFO_ENTRY:
if (strstr(enum_path, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MISSING_REQUIRED)))
Expand Down
93 changes: 73 additions & 20 deletions menu/menu_displaylist.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,42 @@ static int menu_displaylist_parse_core_info(
}
else if (core_info_get_current_core(&core_info) && core_info)
core_path = core_info->path;
else if (info_type == FILE_TYPE_NONE)
{
core_info_t *core_info_menu = NULL;
playlist_t *playlist = playlist_get_cached();

core_path = info_path;

if (playlist)
{
struct menu_state *menu_st = menu_state_get_ptr();
menu_handle_t *menu = menu_st->driver_data;
unsigned idx = menu->rpl_entry_selection_ptr;
const struct playlist_entry *entry = NULL;

playlist_get_index(playlist, idx, &entry);

if (entry)
{
core_path = entry->core_path;

if (string_is_equal(entry->core_path, FILE_PATH_DETECT))
{
const char* default_core_path = playlist_get_default_core_path(playlist);

if ( !string_is_empty(default_core_path)
&& !string_is_equal(default_core_path, FILE_PATH_DETECT))
core_path = default_core_path;
}
}
}

/* Core updater entry - search for corresponding
* core info */
if (core_info_find(core_path, &core_info_menu))
core_info = core_info_menu;
}

if (!core_info || !core_info->has_info)
{
Expand Down Expand Up @@ -2650,9 +2686,9 @@ static int menu_displaylist_parse_playlist(
{
/* Both core name and core path must be valid */
if ( !string_is_empty(entry->core_name)
&& !string_is_equal(entry->core_name, "DETECT")
&& !string_is_equal(entry->core_name, FILE_PATH_DETECT)
&& !string_is_empty(entry->core_path)
&& !string_is_equal(entry->core_path, "DETECT"))
&& !string_is_equal(entry->core_path, FILE_PATH_DETECT))
{
_len += strlcpy(
menu_entry_lbl + _len,
Expand Down Expand Up @@ -5261,8 +5297,24 @@ static unsigned menu_displaylist_parse_content_information(
* core path are valid */
if ( !string_is_empty(entry->core_name)
&& !string_is_empty(core_path)
&& !string_is_equal(core_path, "DETECT"))
&& !string_is_equal(core_path, FILE_PATH_DETECT))
strlcpy(core_name, entry->core_name, sizeof(core_name));
/* Use playlist default core if set */
else if (string_is_equal(entry->core_path, FILE_PATH_DETECT)
&& string_is_equal(entry->core_name, FILE_PATH_DETECT))
{
const char* default_core_name = playlist_get_default_core_name(playlist);
const char* default_core_path = playlist_get_default_core_path(playlist);

if ( !string_is_empty(default_core_name)
&& !string_is_equal(default_core_name, FILE_PATH_DETECT)
&& !string_is_empty(default_core_path)
&& !string_is_equal(default_core_path, FILE_PATH_DETECT))
{
strlcpy(core_name, default_core_name, sizeof(core_name));
core_path = default_core_path;
}
}
}
}
else
Expand All @@ -5286,6 +5338,23 @@ static unsigned menu_displaylist_parse_content_information(
}
}

/* Core name */
if ( !string_is_empty(core_name)
&& !string_is_equal(core_name, FILE_PATH_DETECT))
{
size_t _len = strlcpy(tmp,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_INFO_CORE_NAME),
sizeof(tmp));
_len += strlcpy(tmp + _len, ": ", sizeof(tmp) - _len);
strlcpy(tmp + _len, core_name, sizeof(tmp) - _len);

if (menu_entries_append(info_list, tmp,
msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_INFO_CORE_NAME),
MENU_ENUM_LABEL_CORE_INFORMATION, /* Shortcut to core info */
0, 0, 0, NULL))
count++;
}

#ifdef HAVE_LIBRETRODB
/* Database entry */
if ( !string_is_empty(content_label)
Expand Down Expand Up @@ -5368,22 +5437,6 @@ static unsigned menu_displaylist_parse_content_information(
count++;
}

/* Core name */
if ( !string_is_empty(core_name)
&& !string_is_equal(core_name, "DETECT"))
{
size_t _len = strlcpy(tmp,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_INFO_CORE_NAME),
sizeof(tmp));
_len += strlcpy(tmp + _len, ": ", sizeof(tmp) - _len);
strlcpy(tmp + _len, core_name, sizeof(tmp) - _len);
if (menu_entries_append(info_list, tmp,
msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_INFO_CORE_NAME),
MENU_ENUM_LABEL_CORE_INFORMATION, /* Shortcut to core info */
0, 0, 0, NULL))
count++;
}

/* Runtime */
if ( ((settings->uints.playlist_sublabel_runtime_type == PLAYLIST_RUNTIME_PER_CORE)
&& settings->bools.content_runtime_log)
Expand Down Expand Up @@ -8792,7 +8845,7 @@ unsigned menu_displaylist_build_list(
count++;

if ( string_is_empty(current_core_name)
|| string_is_equal(current_core_name, "DETECT"))
|| string_is_equal(current_core_name, FILE_PATH_DETECT))
{
menu_file_list_cbs_t *cbs = (menu_file_list_cbs_t*)list->list[0].actiondata;
if (cbs)
Expand Down
Loading