From 064372d787601e2abb585d878ebfea059aeea4d6 Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Tue, 11 Feb 2025 21:21:14 +0100 Subject: [PATCH] Get rid of action_title_cache --- menu/menu_driver.c | 7 +------ menu/menu_entries.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index b0483b6e99..9451a57fb0 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -1069,8 +1069,6 @@ size_t menu_entries_get_title(char *s, size_t len) if (cbs && cbs->action_get_title) { const char *label = (list->size) ? list->list[list->size - 1].label : NULL; - if (!string_is_empty(cbs->action_title_cache)) - return strlcpy(s, cbs->action_title_cache, len); /* Show playlist entry instead of "Quick Menu" */ if (string_is_equal(label, "deferred_rpl_entry_actions")) @@ -1095,8 +1093,7 @@ size_t menu_entries_get_title(char *s, size_t len) path = list->list[list->size - 1].path; menu_type = list->list[list->size - 1].type; } - if (cbs->action_get_title(path, label, menu_type, s, len) == 1) - return strlcpy(cbs->action_title_cache, s, sizeof(cbs->action_title_cache)); + cbs->action_get_title(path, label, menu_type, s, len); } } return 0; @@ -4233,7 +4230,6 @@ bool menu_entries_append( return false; cbs->action_sublabel_cache[0] = '\0'; - cbs->action_title_cache[0] = '\0'; cbs->enum_idx = enum_idx; cbs->checked = false; cbs->setting = setting; @@ -4329,7 +4325,6 @@ void menu_entries_prepend(file_list_t *list, return; cbs->action_sublabel_cache[0] = '\0'; - cbs->action_title_cache[0] = '\0'; cbs->enum_idx = enum_idx; cbs->checked = false; cbs->setting = menu_setting_find_enum(cbs->enum_idx); diff --git a/menu/menu_entries.h b/menu/menu_entries.h index 4e371f77e0..2fa8450f10 100644 --- a/menu/menu_entries.h +++ b/menu/menu_entries.h @@ -157,7 +157,6 @@ typedef struct menu_file_list_cbs menu_search_terms_t search; enum msg_hash_enums enum_idx; char action_sublabel_cache[MENU_LABEL_MAX_LENGTH]; - char action_title_cache [512]; bool checked; } menu_file_list_cbs_t;