mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
menu_entry - rich_label gets merged into label - make struct smaller
This commit is contained in:
parent
c864c50c9f
commit
135a228ac1
6 changed files with 33 additions and 35 deletions
|
@ -4052,8 +4052,8 @@ static void materialui_render_menu_entry_default(
|
|||
mui->ticker.selected = entry_selected;
|
||||
|
||||
/* Read entry parameters */
|
||||
if (!string_is_empty(entry->rich_label))
|
||||
entry_label = entry->rich_label;
|
||||
if (!string_is_empty(entry->label))
|
||||
entry_label = entry->label;
|
||||
else
|
||||
entry_label = entry->path;
|
||||
|
||||
|
@ -4481,8 +4481,8 @@ static void materialui_render_menu_entry_playlist_list(
|
|||
mui->ticker.selected = entry_selected;
|
||||
|
||||
/* Read entry parameters */
|
||||
if (!string_is_empty(entry->rich_label))
|
||||
entry_label = entry->rich_label;
|
||||
if (!string_is_empty(entry->label))
|
||||
entry_label = entry->label;
|
||||
else
|
||||
entry_label = entry->path;
|
||||
|
||||
|
@ -4739,8 +4739,8 @@ static void materialui_render_menu_entry_playlist_dual_icon(
|
|||
mui->ticker.selected = entry_selected;
|
||||
|
||||
/* Read entry parameters */
|
||||
if (!string_is_empty(entry->rich_label))
|
||||
entry_label = entry->rich_label;
|
||||
if (!string_is_empty(entry->label))
|
||||
entry_label = entry->label;
|
||||
else
|
||||
entry_label = entry->path;
|
||||
|
||||
|
@ -4894,8 +4894,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->rich_label))
|
||||
entry_label = entry->rich_label;
|
||||
if (!string_is_empty(entry->label))
|
||||
entry_label = entry->label;
|
||||
else
|
||||
entry_label = entry->path;
|
||||
|
||||
|
@ -6514,8 +6514,8 @@ static void materialui_show_fullscreen_thumbnails(
|
|||
menu_entry_get(&selected_entry, 0, selection, NULL, true);
|
||||
|
||||
/* > Get entry label */
|
||||
if (!string_is_empty(selected_entry.rich_label))
|
||||
thumbnail_label = selected_entry.rich_label;
|
||||
if (!string_is_empty(selected_entry.label))
|
||||
thumbnail_label = selected_entry.label;
|
||||
else
|
||||
thumbnail_label = selected_entry.path;
|
||||
|
||||
|
|
|
@ -5816,8 +5816,8 @@ border_iterate:
|
|||
entry_value = entry.value;
|
||||
|
||||
/* Prepare text */
|
||||
if (!string_is_empty(entry.rich_label))
|
||||
entry_rich_label = entry.rich_label;
|
||||
if (!string_is_empty(entry.label))
|
||||
entry_rich_label = entry.label;
|
||||
else
|
||||
entry_rich_label = entry.path;
|
||||
|
||||
|
@ -5890,9 +5890,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.rich_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HISTORY_TAB)))
|
||||
if (string_is_equal(entry.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.rich_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES_TAB)))
|
||||
else if (string_is_equal(entry.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)
|
||||
{
|
||||
|
@ -5904,7 +5904,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.rich_label))
|
||||
if (string_is_equal(playlist_file_noext, entry.label))
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -5584,8 +5584,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.rich_label))
|
||||
ticker_smooth.src_str = entry.rich_label;
|
||||
if (!string_is_empty(entry.label))
|
||||
ticker_smooth.src_str = entry.label;
|
||||
else
|
||||
ticker_smooth.src_str = entry.path;
|
||||
ticker_smooth.dst_str = entry_title_buf;
|
||||
|
@ -5598,8 +5598,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.rich_label))
|
||||
ticker.str = entry.rich_label;
|
||||
if (!string_is_empty(entry.label))
|
||||
ticker.str = entry.label;
|
||||
else
|
||||
ticker.str = entry.path;
|
||||
ticker.selected = entry_selected;
|
||||
|
|
|
@ -4774,8 +4774,8 @@ static int xmb_draw_item(
|
|||
else
|
||||
xmb->ticker_limit = ticker_limit;
|
||||
|
||||
if (!string_is_empty(entry.rich_label))
|
||||
ticker_str = entry.rich_label;
|
||||
if (!string_is_empty(entry.label))
|
||||
ticker_str = entry.label;
|
||||
else
|
||||
ticker_str = entry.path;
|
||||
|
||||
|
@ -5054,9 +5054,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.rich_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HISTORY_TAB)))
|
||||
if (string_is_equal(entry.label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HISTORY_TAB)))
|
||||
texture = xmb->textures.list[XMB_TEXTURE_HISTORY];
|
||||
else if (string_is_equal(entry.rich_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES_TAB)))
|
||||
else if (string_is_equal(entry.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)
|
||||
{
|
||||
|
@ -5069,7 +5069,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.rich_label))
|
||||
if (string_is_equal(playlist_file_noext, entry.label))
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -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->rich_label,
|
||||
sizeof(entry->rich_label));
|
||||
entry->label,
|
||||
sizeof(entry->label));
|
||||
|
||||
if (!path_enabled && string_is_empty(entry->rich_label))
|
||||
if (!path_enabled && string_is_empty(entry->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.rich_label))
|
||||
entry_label = entry.rich_label;
|
||||
if (!string_is_empty(entry.label))
|
||||
entry_label = entry.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.rich_label))
|
||||
return strlcpy(s, entry.rich_label, len);
|
||||
if (!string_is_empty(entry.label))
|
||||
return strlcpy(s, entry.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.rich_label))
|
||||
return strlcpy(s, selected_entry.rich_label, len);
|
||||
if (!string_is_empty(selected_entry.label))
|
||||
return strlcpy(s, selected_entry.label, len);
|
||||
/* > State slot label */
|
||||
else if ( is_quick_menu
|
||||
&& (
|
||||
|
|
|
@ -40,7 +40,6 @@ RETRO_BEGIN_DECLS
|
|||
entry.path[0] = '\0'; \
|
||||
entry.label[0] = '\0'; \
|
||||
entry.sublabel[0] = '\0'; \
|
||||
entry.rich_label[0] = '\0'; \
|
||||
entry.value[0] = '\0'; \
|
||||
entry.password_value[0] = '\0'; \
|
||||
entry.enum_idx = MSG_UNKNOWN; \
|
||||
|
@ -116,7 +115,6 @@ 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;
|
||||
|
|
Loading…
Add table
Reference in a new issue