Revert rich_label changes

This commit is contained in:
LibretroAdmin 2025-02-12 17:46:32 +01:00
parent 106dc5d8b7
commit 8a22b87101
6 changed files with 35 additions and 33 deletions

View File

@ -4059,8 +4059,8 @@ static void materialui_render_menu_entry_default(
mui->ticker.selected = entry_selected; mui->ticker.selected = entry_selected;
/* Read entry parameters */ /* Read entry parameters */
if (!string_is_empty(entry->label)) if (!string_is_empty(entry->rich_label))
entry_label = entry->label; entry_label = entry->rich_label;
else else
entry_label = entry->path; entry_label = entry->path;
@ -4488,8 +4488,8 @@ static void materialui_render_menu_entry_playlist_list(
mui->ticker.selected = entry_selected; mui->ticker.selected = entry_selected;
/* Read entry parameters */ /* Read entry parameters */
if (!string_is_empty(entry->label)) if (!string_is_empty(entry->rich_label))
entry_label = entry->label; entry_label = entry->rich_label;
else else
entry_label = entry->path; entry_label = entry->path;
@ -4746,8 +4746,8 @@ static void materialui_render_menu_entry_playlist_dual_icon(
mui->ticker.selected = entry_selected; mui->ticker.selected = entry_selected;
/* Read entry parameters */ /* Read entry parameters */
if (!string_is_empty(entry->label)) if (!string_is_empty(entry->rich_label))
entry_label = entry->label; entry_label = entry->rich_label;
else else
entry_label = entry->path; 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)); (video_height - mui->nav_bar_layout_height - mui->status_bar.height));
/* Read entry parameters */ /* Read entry parameters */
if (!string_is_empty(entry->label)) if (!string_is_empty(entry->rich_label))
entry_label = entry->label; entry_label = entry->rich_label;
else else
entry_label = entry->path; entry_label = entry->path;
@ -6442,8 +6442,8 @@ static void materialui_update_fullscreen_thumbnail_label(
menu_entry_get(&selected_entry, 0, selection, NULL, true); menu_entry_get(&selected_entry, 0, selection, NULL, true);
/* > Get entry label */ /* > Get entry label */
if (!string_is_empty(selected_entry.label)) if (!string_is_empty(selected_entry.rich_label))
thumbnail_label = selected_entry.label; thumbnail_label = selected_entry.rich_label;
else else
thumbnail_label = selected_entry.path; thumbnail_label = selected_entry.path;

View File

@ -5817,8 +5817,8 @@ border_iterate:
entry_value = entry.value; entry_value = entry.value;
/* Prepare text */ /* Prepare text */
if (!string_is_empty(entry.label)) if (!string_is_empty(entry.rich_label))
entry_rich_label = entry.label; entry_rich_label = entry.rich_label;
else else
entry_rich_label = entry.path; entry_rich_label = entry.path;
@ -5891,9 +5891,9 @@ border_iterate:
/* Playlist manager icons */ /* Playlist manager icons */
else if (ozone->depth == 3 && entry.enum_idx == MENU_ENUM_LABEL_PLAYLIST_MANAGER_SETTINGS) 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]; 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]; texture = ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FAVORITES];
else if (i < ozone->horizontal_list.size) else if (i < ozone->horizontal_list.size)
{ {
@ -5905,7 +5905,7 @@ border_iterate:
{ {
char playlist_file_noext[NAME_MAX_LENGTH]; char playlist_file_noext[NAME_MAX_LENGTH];
fill_pathname(playlist_file_noext, ozone->horizontal_list.list[offset].path, "", sizeof(playlist_file_noext)); 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; break;
} }

View File

@ -5556,8 +5556,8 @@ static void rgui_render(void *data, unsigned width, unsigned height,
{ {
ticker_smooth.selected = entry_selected; ticker_smooth.selected = entry_selected;
ticker_smooth.field_width = (unsigned)(entry_title_max_len * rgui->font_width_stride); ticker_smooth.field_width = (unsigned)(entry_title_max_len * rgui->font_width_stride);
if (!string_is_empty(entry.label)) if (!string_is_empty(entry.rich_label))
ticker_smooth.src_str = entry.label; ticker_smooth.src_str = entry.rich_label;
else else
ticker_smooth.src_str = entry.path; ticker_smooth.src_str = entry.path;
ticker_smooth.dst_str = entry_title_buf; 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.s = entry_title_buf;
ticker.len = entry_title_max_len; ticker.len = entry_title_max_len;
if (!string_is_empty(entry.label)) if (!string_is_empty(entry.rich_label))
ticker.str = entry.label; ticker.str = entry.rich_label;
else else
ticker.str = entry.path; ticker.str = entry.path;
ticker.selected = entry_selected; ticker.selected = entry_selected;

View File

@ -4779,8 +4779,8 @@ static int xmb_draw_item(
else else
xmb->ticker_limit = ticker_limit; xmb->ticker_limit = ticker_limit;
if (!string_is_empty(entry.label)) if (!string_is_empty(entry.rich_label))
ticker_str = entry.label; ticker_str = entry.rich_label;
else else
ticker_str = entry.path; ticker_str = entry.path;
@ -5059,9 +5059,9 @@ static int xmb_draw_item(
/* Playlist manager icons */ /* Playlist manager icons */
else if (xmb->depth == 3 && entry.enum_idx == MENU_ENUM_LABEL_PLAYLIST_MANAGER_SETTINGS) 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]; 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]; texture = xmb->textures.list[XMB_TEXTURE_FAVORITES];
else if (i < xmb->horizontal_list.size) else if (i < xmb->horizontal_list.size)
{ {
@ -5074,7 +5074,7 @@ static int xmb_draw_item(
char playlist_file_noext[NAME_MAX_LENGTH]; char playlist_file_noext[NAME_MAX_LENGTH];
fill_pathname(playlist_file_noext, xmb->horizontal_list.list[offset].path, "", fill_pathname(playlist_file_noext, xmb->horizontal_list.list[offset].path, "",
sizeof(playlist_file_noext)); sizeof(playlist_file_noext));
if (string_is_equal(playlist_file_noext, entry.label)) if (string_is_equal(playlist_file_noext, entry.rich_label))
break; break;
} }

View File

@ -435,10 +435,10 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
cbs->action_label(list, cbs->action_label(list,
entry->type, (unsigned)i, entry->type, (unsigned)i,
label, path, label, path,
entry->label, entry->rich_label,
sizeof(entry->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; path_enabled = true;
} }
@ -580,8 +580,8 @@ bool menu_entries_list_search(const char *needle, size_t *idx)
continue; continue;
/* Get displayed entry label */ /* Get displayed entry label */
if (!string_is_empty(entry.label)) if (!string_is_empty(entry.rich_label))
entry_label = entry.label; entry_label = entry.rich_label;
else else
entry_label = entry.path; 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_VALUE_ENABLED
| MENU_ENTRY_FLAG_SUBLABEL_ENABLED; | MENU_ENTRY_FLAG_SUBLABEL_ENABLED;
menu_entry_get(&entry, 0, menu_st->selection_ptr, NULL, true); menu_entry_get(&entry, 0, menu_st->selection_ptr, NULL, true);
if (!string_is_empty(entry.label)) if (!string_is_empty(entry.rich_label))
return strlcpy(s, entry.label, len); return strlcpy(s, entry.rich_label, len);
return strlcpy(s, entry.path, len); return strlcpy(s, entry.path, len);
} }
#endif #endif
@ -7972,8 +7972,8 @@ size_t menu_update_fullscreen_thumbnail_label(
| MENU_ENTRY_FLAG_RICH_LABEL_ENABLED; | MENU_ENTRY_FLAG_RICH_LABEL_ENABLED;
menu_entry_get(&selected_entry, 0, menu_st->selection_ptr, NULL, true); menu_entry_get(&selected_entry, 0, menu_st->selection_ptr, NULL, true);
/* > Get entry label */ /* > Get entry label */
if (!string_is_empty(selected_entry.label)) if (!string_is_empty(selected_entry.rich_label))
return strlcpy(s, selected_entry.label, len); return strlcpy(s, selected_entry.rich_label, len);
/* > State slot label */ /* > State slot label */
else if ( is_quick_menu else if ( is_quick_menu
&& ( && (

View File

@ -39,6 +39,7 @@ RETRO_BEGIN_DECLS
#define MENU_ENTRY_INITIALIZE(entry) \ #define MENU_ENTRY_INITIALIZE(entry) \
entry.path[0] = '\0'; \ entry.path[0] = '\0'; \
entry.label[0] = '\0'; \ entry.label[0] = '\0'; \
entry.rich_label[0] = '\0'; \
entry.sublabel[0] = '\0'; \ entry.sublabel[0] = '\0'; \
entry.value[0] = '\0'; \ entry.value[0] = '\0'; \
entry.password_value[0] = '\0'; \ entry.password_value[0] = '\0'; \
@ -115,6 +116,7 @@ typedef struct menu_entry
char sublabel[MENU_LABEL_MAX_LENGTH]; char sublabel[MENU_LABEL_MAX_LENGTH];
char path[NAME_MAX_LENGTH]; char path[NAME_MAX_LENGTH];
char label[MENU_LABEL_MAX_LENGTH]; char label[MENU_LABEL_MAX_LENGTH];
char rich_label[MENU_LABEL_MAX_LENGTH];
char value[NAME_MAX_LENGTH]; char value[NAME_MAX_LENGTH];
char password_value[NAME_MAX_LENGTH]; char password_value[NAME_MAX_LENGTH];
} menu_entry_t; } menu_entry_t;