diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 4da7cbc1de..be1b4456b7 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -524,7 +524,7 @@ static void xmb_selection_pointer_changed(void) float iy; float ia = xmb->item.passive.alpha; float iz = xmb->item.passive.zoom; - xmb_node_t *node = (xmb_node_t*)file_list_get_userdata_at_offset( + xmb_node_t *node = (xmb_node_t*)menu_list_get_userdata_at_offset( menu_list->selection_buf, i); if (!node) @@ -564,7 +564,7 @@ static void xmb_list_open_old(xmb_handle_t *xmb, for (i = 0; i < end; i++) { float ia = 0; - xmb_node_t *node = (xmb_node_t*)file_list_get_userdata_at_offset(list, i); + xmb_node_t *node = (xmb_node_t*)menu_list_get_userdata_at_offset(list, i); if (!node) continue; @@ -600,7 +600,7 @@ static void xmb_list_open_new(xmb_handle_t *xmb, { float ia; xmb_node_t *node = (xmb_node_t*) - file_list_get_userdata_at_offset(list, i); + menu_list_get_userdata_at_offset(list, i); if (!node) continue; @@ -693,7 +693,7 @@ static void xmb_list_switch_old(xmb_handle_t *xmb, for (i = 0; i < end; i++) { xmb_node_t *node = (xmb_node_t*) - file_list_get_userdata_at_offset(list, i); + menu_list_get_userdata_at_offset(list, i); float ia = 0; if (!node) @@ -738,7 +738,7 @@ static void xmb_list_switch_new(xmb_handle_t *xmb, for (i = 0; i < end; i++) { xmb_node_t *node = (xmb_node_t*) - file_list_get_userdata_at_offset(list, i); + menu_list_get_userdata_at_offset(list, i); float ia = 0.5; if (!node) @@ -1025,7 +1025,7 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl, menu_entry_t entry = {{0}}; GLuint texture_switch = 0; GLuint icon = 0; - xmb_node_t * node = (xmb_node_t*)file_list_get_userdata_at_offset(list, i); + xmb_node_t * node = (xmb_node_t*)menu_list_get_userdata_at_offset(list, i); menu_handle_t *menu = menu_driver_get_ptr(); uint32_t hash_label = 0; uint32_t hash_value = 0; diff --git a/menu/menu_list.c b/menu/menu_list.c index 87763b600b..2fa351c328 100644 --- a/menu/menu_list.c +++ b/menu/menu_list.c @@ -224,6 +224,13 @@ void menu_list_get_last_stack(const menu_list_t *list, menu_list_get_last(list->menu_stack, path, label, file_type, entry_idx); } +void *menu_list_get_userdata_at_offset(const file_list_t *list, size_t idx) +{ + if (!list) + return NULL; + return (menu_file_list_cbs_t*)file_list_get_userdata_at_offset(list, idx); +} + menu_file_list_cbs_t *menu_list_get_actiondata_at_offset(const file_list_t *list, size_t idx) { if (!list) diff --git a/menu/menu_list.h b/menu/menu_list.h index b4ccefeeb5..59e569ca27 100644 --- a/menu/menu_list.h +++ b/menu/menu_list.h @@ -89,6 +89,8 @@ void menu_list_get_at_offset(const file_list_t *list, size_t idx, const char **path, const char **label, unsigned *file_type, size_t *entry_idx); +void *menu_list_get_userdata_at_offset(const file_list_t *list, size_t idx); + menu_file_list_cbs_t *menu_list_get_actiondata_at_offset(const file_list_t *list, size_t idx); size_t menu_list_get_stack_size(menu_list_t *list);