(XMB) Fix horizontal navigation

This commit is contained in:
Higor Eurípedes 2015-06-10 09:19:38 -03:00
parent ad9f0c4021
commit 3673fc6100
2 changed files with 9 additions and 2 deletions

View File

@ -151,7 +151,7 @@ static int action_right_mainmenu(unsigned type, const char *label,
if (list_size == 1)
{
menu->navigation.selection_ptr = 0;
if (menu->categories.selection_ptr != (menu_driver_list_get_size(MENU_LIST_HORIZONTAL) - 1))
if (menu->categories.selection_ptr != (menu_driver_list_get_size(MENU_LIST_HORIZONTAL)))
push_list = 1;
}
else

View File

@ -1927,7 +1927,7 @@ static void xmb_list_delete(file_list_t *list,
static void xmb_list_cache(menu_list_type_t type, unsigned action)
{
size_t stack_size;
size_t stack_size, list_size;
xmb_handle_t *xmb = NULL;
menu_handle_t *menu = menu_driver_get_ptr();
menu_list_t *menu_list = menu_list_get_ptr();
@ -1961,6 +1961,13 @@ static void xmb_list_cache(menu_list_type_t type, unsigned action)
break;
}
list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL);
if (menu->categories.selection_ptr > list_size)
{
menu->categories.selection_ptr = list_size;
return;
}
stack_size = menu_list->menu_stack->size;
if (menu_list->menu_stack->list[stack_size - 1].label)