diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index 72aa1775a1..357c0f0966 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -286,7 +286,7 @@ static void glui_render(void) static void glui_render_menu_list(runloop_t *runloop, glui_handle_t *glui, menu_handle_t *menu, - const char *label, uint32_t normal_color, + uint32_t normal_color, uint32_t hover_color) { size_t i = 0; @@ -305,7 +305,7 @@ static void glui_render_menu_list(runloop_t *runloop, entry_title_buf[PATH_MAX_LENGTH], type_str_buf[PATH_MAX_LENGTH]; bool selected = false; - menu_list_get_entry(&entry, i, label, NULL); + menu_list_get_entry(&entry, i, NULL); selected = menu_list_entry_is_currently_selected(&entry); menu_animation_ticker_line(entry_title_buf, glui->ticker_limit, @@ -381,8 +381,7 @@ static void glui_frame(void) menu_display_font_bind_block(menu, font_driver, &glui->list_block); - glui_render_menu_list(runloop, glui, menu, - label, normal_color, hover_color); + glui_render_menu_list(runloop, glui, menu, normal_color, hover_color); menu_display_font_flush_block(menu, font_driver); diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 5dab13ba28..65221fdb00 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -493,7 +493,7 @@ static void rgui_render(void) entry_title_buf[PATH_MAX_LENGTH], type_str_buf[PATH_MAX_LENGTH]; bool selected = false; - menu_list_get_entry(&entry, i, label, NULL); + menu_list_get_entry(&entry, i, NULL); selected = menu_list_entry_is_currently_selected(&entry); if (i > (menu->navigation.selection_ptr + 100)) diff --git a/menu/drivers/rmenu.c b/menu/drivers/rmenu.c index 206826ba74..4e12ab1ff6 100644 --- a/menu/drivers/rmenu.c +++ b/menu/drivers/rmenu.c @@ -234,7 +234,7 @@ static void rmenu_render(void) entry_title_buf[PATH_MAX_LENGTH], type_str_buf[PATH_MAX_LENGTH]; bool selected = false; - menu_list_get_entry(&entry, i, label, NULL); + menu_list_get_entry(&entry, i, NULL); selected = menu_list_entry_is_currently_selected(&entry); menu_animation_ticker_line(entry_title_buf, RMENU_TERM_WIDTH - (entry.spacing + 1 + 2), diff --git a/menu/drivers/rmenu_xui.cpp b/menu/drivers/rmenu_xui.cpp index 57fd2247a9..fec504d703 100644 --- a/menu/drivers/rmenu_xui.cpp +++ b/menu/drivers/rmenu_xui.cpp @@ -605,7 +605,7 @@ static void rmenu_xui_render(void) menu_entry_t entry; wchar_t msg_left[PATH_MAX_LENGTH], msg_right[PATH_MAX_LENGTH]; - menu_list_get_entry(&entry, i, label, NULL); + menu_list_get_entry(&entry, i, NULL); mbstowcs(msg_left, entry.path, sizeof(msg_left) / sizeof(wchar_t)); mbstowcs(msg_right, entry.value, sizeof(msg_right) / sizeof(wchar_t)); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index fb7dbbf9ea..599daf2683 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1020,7 +1020,7 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl, icon_y > global->video_data.height + xmb->icon.size) continue; - menu_list_get_entry(&entry, i, label, list); + menu_list_get_entry(&entry, i, list); if (entry.type == MENU_FILE_CONTENTLIST_ENTRY) strlcpy(entry.path, path_basename(entry.path), sizeof(entry.path)); diff --git a/menu/menu_list.c b/menu/menu_list.c index c03b8d5a1d..b83c389ac3 100644 --- a/menu/menu_list.c +++ b/menu/menu_list.c @@ -447,9 +447,9 @@ int menu_list_populate_generic(file_list_t *list, const char *path, return 0; } -void menu_list_get_entry(menu_entry_t *entry, size_t i, - const char *label, void *userdata) +void menu_list_get_entry(menu_entry_t *entry, size_t i, void *userdata) { + const char *label = NULL; const char *path = NULL; const char *entry_label = NULL; menu_file_list_cbs_t *cbs = NULL; @@ -458,6 +458,8 @@ void menu_list_get_entry(menu_entry_t *entry, size_t i, if (!menu_list) return; + + menu_list_get_last_stack(menu_list, NULL, &label, NULL); list = userdata ? (file_list_t*)userdata : menu_list->selection_buf; @@ -496,13 +498,10 @@ int menu_list_get_current_entry_id(void) menu_list_t *menu_list = menu_list_get_ptr(); size_t end = menu_list_get_size(menu_list); - menu_list_get_last_stack(menu_list, - NULL, &label, NULL); - for (i = 0; i < end; i++) { menu_entry_t entry; - menu_list_get_entry(&entry, i, label, NULL); + menu_list_get_entry(&entry, i, NULL); if (menu_list_entry_is_currently_selected(&entry)) return i; diff --git a/menu/menu_list.h b/menu/menu_list.h index 388f15b803..ba1c85a774 100644 --- a/menu/menu_list.h +++ b/menu/menu_list.h @@ -107,8 +107,7 @@ void menu_list_set_alt_at_offset(file_list_t *list, size_t idx, int menu_list_populate_generic(file_list_t *list, const char *path, const char *label, unsigned type); -void menu_list_get_entry(menu_entry_t *entry, size_t i, const char *label, - void *userdata); +void menu_list_get_entry(menu_entry_t *entry, size_t i, void *userdata); int menu_list_get_current_entry_id(void);