diff --git a/libretro-common/include/lists/file_list.h b/libretro-common/include/lists/file_list.h index defbc9ab72..c41b5e7968 100644 --- a/libretro-common/include/lists/file_list.h +++ b/libretro-common/include/lists/file_list.h @@ -132,9 +132,6 @@ void file_list_set_userdata(const file_list_t *list, size_t idx, void *ptr); void file_list_set_actiondata(const file_list_t *list, size_t idx, void *ptr); -void file_list_get_alt_at_offset(const file_list_t *list, size_t index, - const char **alt); - void file_list_sort_on_alt(file_list_t *list); void file_list_sort_on_type(file_list_t *list); diff --git a/libretro-common/lists/file_list.c b/libretro-common/lists/file_list.c index 5b329823ec..d44bbcbd6e 100644 --- a/libretro-common/lists/file_list.c +++ b/libretro-common/lists/file_list.c @@ -265,15 +265,6 @@ void file_list_set_alt_at_offset(file_list_t *list, size_t idx, list->list[idx].alt = strdup(alt); } -void file_list_get_alt_at_offset(const file_list_t *list, size_t idx, - const char **alt) -{ - if (list && alt) - *alt = list->list[idx].alt - ? list->list[idx].alt - : list->list[idx].path; -} - static int file_list_alt_cmp(const void *a_, const void *b_) { const struct item_file *a = (const struct item_file*)a_; @@ -384,7 +375,6 @@ void file_list_get_last(const file_list_t *list, bool file_list_search(const file_list_t *list, const char *needle, size_t *idx) { size_t i; - const char *alt = NULL; bool ret = false; if (!list) @@ -393,8 +383,10 @@ bool file_list_search(const file_list_t *list, const char *needle, size_t *idx) for (i = 0; i < list->size; i++) { const char *str = NULL; + const char *alt = list->list[i].alt + ? list->list[i].alt + : list->list[i].path; - file_list_get_alt_at_offset(list, i, &alt); if (!alt) { file_list_get_label_at_offset(list, i, &alt); diff --git a/menu/menu_driver.c b/menu/menu_driver.c index d280d35f1a..81889e1a5c 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -971,7 +971,10 @@ void menu_entries_get_at_offset(const file_list_t *list, size_t idx, size_t *entry_idx, const char **alt) { file_list_get_at_offset(list, idx, path, label, file_type, entry_idx); - file_list_get_alt_at_offset(list, idx, alt); + if (list && alt) + *alt = list->list[idx].alt + ? list->list[idx].alt + : list->list[idx].path; } /**