diff --git a/menu/drivers/rmenu_xui.cpp b/menu/drivers/rmenu_xui.cpp index 2780f5a89d..29634de1e3 100644 --- a/menu/drivers/rmenu_xui.cpp +++ b/menu/drivers/rmenu_xui.cpp @@ -634,7 +634,7 @@ static void rmenu_xui_list_insert(file_list_t *list, XuiListSetText(m_menulist, list_size, buf); } -static void rmenu_xui_list_delete(file_list_t *list, size_t idx, +static void rmenu_xui_list_free(file_list_t *list, size_t idx, size_t list_size) { int x = XuiListGetItemCount( m_menulist ); @@ -677,7 +677,7 @@ menu_ctx_driver_t menu_ctx_rmenu_xui = { rmenu_xui_navigation_alphabet, rmenu_xui_navigation_alphabet, rmenu_xui_list_insert, - rmenu_xui_list_delete, + rmenu_xui_list_free, rmenu_xui_list_clear, NULL, NULL, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 540a77fbbb..a996377b95 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1902,7 +1902,7 @@ static void xmb_list_insert(file_list_t *list, file_list_set_userdata(list, i, node); } -static void xmb_list_delete(file_list_t *list, +static void xmb_list_free(file_list_t *list, size_t idx, size_t list_size) { file_list_free_userdata(list, idx); @@ -2122,7 +2122,7 @@ menu_ctx_driver_t menu_ctx_xmb = { xmb_navigation_alphabet, xmb_navigation_alphabet, xmb_list_insert, - xmb_list_delete, + xmb_list_free, NULL, xmb_list_cache, xmb_list_get_size, diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 794abd9618..caac83b253 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -183,23 +183,13 @@ const menu_ctx_driver_t *menu_ctx_driver_get_ptr(void) return driver->menu_ctx; } -void menu_driver_list_delete(file_list_t *list, size_t idx, size_t list_size) +void menu_driver_list_free(file_list_t *list, size_t idx, size_t list_size) { - menu_file_list_cbs_t *cbs = NULL; const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr(); - if (driver->list_delete) - driver->list_delete(list, idx, list_size); + if (driver->list_free) + driver->list_free(list, idx, list_size); - if (!list) - return; - - cbs = (menu_file_list_cbs_t*)file_list_get_actiondata_at_offset(list, idx); - - if (cbs) - { - memset(cbs, 0, sizeof(*cbs)); - } file_list_free_actiondata(list, idx); } diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 1d29154732..57f85bef27 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -255,7 +255,7 @@ typedef struct menu_ctx_driver void (*navigation_descend_alphabet)(size_t *); void (*navigation_ascend_alphabet)(size_t *); void (*list_insert)(file_list_t *list, const char *, const char *, size_t); - void (*list_delete)(file_list_t *list, size_t, size_t); + void (*list_free)(file_list_t *list, size_t, size_t); void (*list_clear)(file_list_t *list); void (*list_cache)(menu_list_type_t, unsigned); size_t(*list_get_size)(void *data, menu_list_type_t type); @@ -347,7 +347,7 @@ void menu_driver_navigation_ascend_alphabet(size_t *); void menu_driver_list_cache(menu_list_type_t type, unsigned action); -void menu_driver_list_delete(file_list_t *list, size_t i, size_t list_size); +void menu_driver_list_free(file_list_t *list, size_t i, size_t list_size); void menu_driver_list_insert(file_list_t *list, const char *path, const char *label, unsigned type, size_t list_size); diff --git a/menu/menu_list.c b/menu/menu_list.c index 74a159e69e..a0ce78c669 100644 --- a/menu/menu_list.c +++ b/menu/menu_list.c @@ -162,7 +162,7 @@ static void menu_list_destroy(file_list_t *list) goto end; for (i = 0; i < list->size; i++) - menu_driver_list_delete(list, i, list->size); + menu_driver_list_free(list, i, list->size); end: if (list) @@ -315,7 +315,7 @@ void menu_list_pop(file_list_t *list, size_t *directory_ptr) goto end; if (list->size != 0) - menu_driver_list_delete(list, list->size - 1, list->size - 1); + menu_driver_list_free(list, list->size - 1, list->size - 1); end: file_list_pop(list, directory_ptr);