From 51ff4b52a8ac369469ef3780ee45e1bc9d0a9755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= <jean.andre.santoni@gmail.com> Date: Sat, 18 Oct 2014 01:24:14 +0200 Subject: [PATCH] (XMB) Fix core list display --- frontend/menu/disp/xmb.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/frontend/menu/disp/xmb.c b/frontend/menu/disp/xmb.c index a0a227ac3b..d4bb53b73a 100644 --- a/frontend/menu/disp/xmb.c +++ b/frontend/menu/disp/xmb.c @@ -386,8 +386,9 @@ static void xmb_selection_pointer_changed(void) } static void xmb_populate_entries(void *data, const char *path, - const char *label, unsigned i) + const char *label, unsigned j) { + int i, current, end; xmb_handle_t *xmb = (xmb_handle_t*)driver.menu->userdata; if (!xmb) @@ -404,6 +405,32 @@ static void xmb_populate_entries(void *data, const char *path, add_tween(XMB_DELAY, xmb->x+20, &xmb->x, &inOutQuad, NULL); } + + current = driver.menu->selection_ptr; + end = menu_list_get_size(); + + for (i = 0; i < end; i++) + { + xmb_node_t *node = (xmb_node_t*)file_list_get_userdata_at_offset( + driver.menu->selection_buf, i); + + if (!node) + continue; + + node->alpha = xmb->i_passive_alpha; + node->zoom = xmb->i_passive_zoom; + node->y = (i < current) ? xmb->vspacing * + (i - current + xmb->above_item_offset) : + xmb->vspacing * (i - current + xmb->under_item_offset); + + if (i == current) + { + node->alpha = xmb->i_active_alpha; + node->zoom = xmb->i_active_zoom; + node->y = xmb->vspacing * xmb->active_item_factor; + } + } + xmb->old_depth = xmb->depth; } @@ -879,7 +906,6 @@ static void xmb_list_insert(void *data, if (i == current) iy = xmb->vspacing * xmb->active_item_factor; - node->alpha = (i == current) ? xmb->i_active_alpha : xmb->i_passive_alpha; node->zoom = (i == current) ? xmb->i_active_zoom : xmb->i_passive_zoom; node->y = iy;