mirror of
https://github.com/libretro/RetroArch.git
synced 2025-12-28 05:24:00 +00:00
Show content label in QM title also with CLI launch
This commit is contained in:
parent
4d35ce17e5
commit
80bf5d847b
@ -1066,23 +1066,41 @@ size_t menu_entries_get_title(char *s, size_t len)
|
||||
const char *label = (list->size) ? list->list[list->size - 1].label : NULL;
|
||||
|
||||
/* Show playlist entry instead of "Quick Menu" */
|
||||
if (string_is_equal(label, "deferred_rpl_entry_actions"))
|
||||
if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS)))
|
||||
{
|
||||
playlist_t *playlist = playlist_get_cached();
|
||||
if (playlist)
|
||||
{
|
||||
const struct playlist_entry *entry = NULL;
|
||||
playlist_get_index(playlist, menu->rpl_entry_selection_ptr, &entry);
|
||||
|
||||
if (entry)
|
||||
{
|
||||
char entry_path[NAME_MAX_LENGTH];
|
||||
|
||||
strlcpy(entry_path, entry->path, sizeof(entry_path));
|
||||
path_remove_extension(entry_path);
|
||||
return strlcpy(s,
|
||||
!string_is_empty(entry->label) ? entry->label : entry->path,
|
||||
!string_is_empty(entry->label) ? entry->label : path_basename(entry_path),
|
||||
len);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *path = NULL;
|
||||
unsigned menu_type = 0;
|
||||
|
||||
if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_SETTINGS))
|
||||
&& !path_is_empty(RARCH_PATH_CONTENT))
|
||||
{
|
||||
char content_label[NAME_MAX_LENGTH];
|
||||
|
||||
strlcpy(content_label, path_get(RARCH_PATH_CONTENT), sizeof(content_label));
|
||||
path_remove_extension(content_label);
|
||||
return strlcpy(s, path_basename(content_label), len);
|
||||
}
|
||||
|
||||
if (list->size)
|
||||
{
|
||||
path = list->list[list->size - 1].path;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user