From db0dcb64fa3af6985ebae518491b000ad00b5361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Fri, 12 Jun 2015 20:05:02 -0300 Subject: [PATCH] (XMB) Add xmb_node_kill_animation() --- menu/drivers/xmb.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 3bd0b3e27f..702124476e 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1865,6 +1865,22 @@ static void xmb_navigation_alphabet(size_t *unused) xmb_selection_pointer_changed(); } +static void xmb_node_kill_animation(menu_handle_t *menu, xmb_node_t *node) +{ + float *subjects[5]; + + if (!node) + return; + + subjects[0] = &node->alpha; + subjects[1] = &node->label_alpha; + subjects[2] = &node->zoom; + subjects[3] = &node->x; + subjects[4] = &node->y; + + menu_animation_kill_by_subject(menu->animation, 5, subjects); +} + static void xmb_list_insert(file_list_t *list, const char *path, const char *unused, size_t list_size) { @@ -1911,6 +1927,18 @@ static void xmb_list_insert(file_list_t *list, static void xmb_list_free(file_list_t *list, size_t idx, size_t list_size) { + menu_handle_t *menu = menu_driver_get_ptr(); + xmb_node_t *node; + + if (!list || !menu) + return; + + node = (xmb_node_t*)menu_list_get_userdata_at_offset(list, idx); + + if (node) + xmb_node_kill_animation(menu, node); + + file_list_free_userdata(list, idx); } static void xmb_list_cache(menu_list_type_t type, unsigned action)