diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index cb725dc5ef..a86acd0239 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -4059,8 +4059,8 @@ static void materialui_render_menu_entry_default( mui->ticker.selected = entry_selected; /* Read entry parameters */ - if (!string_is_empty(entry->label)) - entry_label = entry->label; + if (!string_is_empty(entry->rich_label)) + entry_label = entry->rich_label; else entry_label = entry->path; @@ -4488,8 +4488,8 @@ static void materialui_render_menu_entry_playlist_list( mui->ticker.selected = entry_selected; /* Read entry parameters */ - if (!string_is_empty(entry->label)) - entry_label = entry->label; + if (!string_is_empty(entry->rich_label)) + entry_label = entry->rich_label; else entry_label = entry->path; @@ -4746,8 +4746,8 @@ static void materialui_render_menu_entry_playlist_dual_icon( mui->ticker.selected = entry_selected; /* Read entry parameters */ - if (!string_is_empty(entry->label)) - entry_label = entry->label; + if (!string_is_empty(entry->rich_label)) + entry_label = entry->rich_label; else entry_label = entry->path; @@ -4901,8 +4901,8 @@ static void materialui_render_menu_entry_playlist_desktop( (video_height - mui->nav_bar_layout_height - mui->status_bar.height)); /* Read entry parameters */ - if (!string_is_empty(entry->label)) - entry_label = entry->label; + if (!string_is_empty(entry->rich_label)) + entry_label = entry->rich_label; else entry_label = entry->path; @@ -6442,8 +6442,8 @@ static void materialui_update_fullscreen_thumbnail_label( menu_entry_get(&selected_entry, 0, selection, NULL, true); /* > Get entry label */ - if (!string_is_empty(selected_entry.label)) - thumbnail_label = selected_entry.label; + if (!string_is_empty(selected_entry.rich_label)) + thumbnail_label = selected_entry.rich_label; else thumbnail_label = selected_entry.path; diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c index 362a2e77c9..f74edc9a3e 100644 --- a/menu/drivers/ozone.c +++ b/menu/drivers/ozone.c @@ -5817,8 +5817,8 @@ border_iterate: entry_value = entry.value; /* Prepare text */ - if (!string_is_empty(entry.label)) - entry_rich_label = entry.label; + if (!string_is_empty(entry.rich_label)) + entry_rich_label = entry.rich_label; else entry_rich_label = entry.path; @@ -5891,9 +5891,9 @@ border_iterate: /* Playlist manager icons */ else if (ozone->depth == 3 && entry.enum_idx == MENU_ENUM_LABEL_PLAYLIST_MANAGER_SETTINGS) { - if (string_is_equal(entry.label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HISTORY_TAB))) + if (string_is_equal(entry.rich_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HISTORY_TAB))) texture = ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_HISTORY]; - else if (string_is_equal(entry.label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES_TAB))) + else if (string_is_equal(entry.rich_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES_TAB))) texture = ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FAVORITES]; else if (i < ozone->horizontal_list.size) { @@ -5905,7 +5905,7 @@ border_iterate: { char playlist_file_noext[NAME_MAX_LENGTH]; fill_pathname(playlist_file_noext, ozone->horizontal_list.list[offset].path, "", sizeof(playlist_file_noext)); - if (string_is_equal(playlist_file_noext, entry.label)) + if (string_is_equal(playlist_file_noext, entry.rich_label)) break; } diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 6051563094..392378f589 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -5556,8 +5556,8 @@ static void rgui_render(void *data, unsigned width, unsigned height, { ticker_smooth.selected = entry_selected; ticker_smooth.field_width = (unsigned)(entry_title_max_len * rgui->font_width_stride); - if (!string_is_empty(entry.label)) - ticker_smooth.src_str = entry.label; + if (!string_is_empty(entry.rich_label)) + ticker_smooth.src_str = entry.rich_label; else ticker_smooth.src_str = entry.path; ticker_smooth.dst_str = entry_title_buf; @@ -5570,8 +5570,8 @@ static void rgui_render(void *data, unsigned width, unsigned height, { ticker.s = entry_title_buf; ticker.len = entry_title_max_len; - if (!string_is_empty(entry.label)) - ticker.str = entry.label; + if (!string_is_empty(entry.rich_label)) + ticker.str = entry.rich_label; else ticker.str = entry.path; ticker.selected = entry_selected; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 456b8e8cf0..8049e74f4d 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -4779,8 +4779,8 @@ static int xmb_draw_item( else xmb->ticker_limit = ticker_limit; - if (!string_is_empty(entry.label)) - ticker_str = entry.label; + if (!string_is_empty(entry.rich_label)) + ticker_str = entry.rich_label; else ticker_str = entry.path; @@ -5059,9 +5059,9 @@ static int xmb_draw_item( /* Playlist manager icons */ else if (xmb->depth == 3 && entry.enum_idx == MENU_ENUM_LABEL_PLAYLIST_MANAGER_SETTINGS) { - if (string_is_equal(entry.label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HISTORY_TAB))) + if (string_is_equal(entry.rich_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HISTORY_TAB))) texture = xmb->textures.list[XMB_TEXTURE_HISTORY]; - else if (string_is_equal(entry.label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES_TAB))) + else if (string_is_equal(entry.rich_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES_TAB))) texture = xmb->textures.list[XMB_TEXTURE_FAVORITES]; else if (i < xmb->horizontal_list.size) { @@ -5074,7 +5074,7 @@ static int xmb_draw_item( char playlist_file_noext[NAME_MAX_LENGTH]; fill_pathname(playlist_file_noext, xmb->horizontal_list.list[offset].path, "", sizeof(playlist_file_noext)); - if (string_is_equal(playlist_file_noext, entry.label)) + if (string_is_equal(playlist_file_noext, entry.rich_label)) break; } diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 21f3e15350..652df3cd2d 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -435,10 +435,10 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx, cbs->action_label(list, entry->type, (unsigned)i, label, path, - entry->label, - sizeof(entry->label)); + entry->rich_label, + sizeof(entry->rich_label)); - if (!path_enabled && string_is_empty(entry->label)) + if (!path_enabled && string_is_empty(entry->rich_label)) path_enabled = true; } @@ -580,8 +580,8 @@ bool menu_entries_list_search(const char *needle, size_t *idx) continue; /* Get displayed entry label */ - if (!string_is_empty(entry.label)) - entry_label = entry.label; + if (!string_is_empty(entry.rich_label)) + entry_label = entry.rich_label; else entry_label = entry.path; @@ -4020,8 +4020,8 @@ static size_t menu_driver_get_current_menu_label(struct menu_state *menu_st, | MENU_ENTRY_FLAG_VALUE_ENABLED | MENU_ENTRY_FLAG_SUBLABEL_ENABLED; menu_entry_get(&entry, 0, menu_st->selection_ptr, NULL, true); - if (!string_is_empty(entry.label)) - return strlcpy(s, entry.label, len); + if (!string_is_empty(entry.rich_label)) + return strlcpy(s, entry.rich_label, len); return strlcpy(s, entry.path, len); } #endif @@ -7972,8 +7972,8 @@ size_t menu_update_fullscreen_thumbnail_label( | MENU_ENTRY_FLAG_RICH_LABEL_ENABLED; menu_entry_get(&selected_entry, 0, menu_st->selection_ptr, NULL, true); /* > Get entry label */ - if (!string_is_empty(selected_entry.label)) - return strlcpy(s, selected_entry.label, len); + if (!string_is_empty(selected_entry.rich_label)) + return strlcpy(s, selected_entry.rich_label, len); /* > State slot label */ else if ( is_quick_menu && ( diff --git a/menu/menu_entries.h b/menu/menu_entries.h index 87054c5148..c52a68f441 100644 --- a/menu/menu_entries.h +++ b/menu/menu_entries.h @@ -39,6 +39,7 @@ RETRO_BEGIN_DECLS #define MENU_ENTRY_INITIALIZE(entry) \ entry.path[0] = '\0'; \ entry.label[0] = '\0'; \ + entry.rich_label[0] = '\0'; \ entry.sublabel[0] = '\0'; \ entry.value[0] = '\0'; \ entry.password_value[0] = '\0'; \ @@ -115,6 +116,7 @@ typedef struct menu_entry char sublabel[MENU_LABEL_MAX_LENGTH]; char path[NAME_MAX_LENGTH]; char label[MENU_LABEL_MAX_LENGTH]; + char rich_label[MENU_LABEL_MAX_LENGTH]; char value[NAME_MAX_LENGTH]; char password_value[NAME_MAX_LENGTH]; } menu_entry_t;