diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index 9a8ef0e5fa..f31282cd99 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -130,6 +130,7 @@ static int action_left_mainmenu(unsigned type, const char *label, unsigned push_list = 0; file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(); file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(); + settings_t *settings = config_get_ptr(); menu_handle_t *menu = menu_driver_get_ptr(); unsigned action = MENU_ACTION_LEFT; size_t list_size = menu_driver_list_get_size(MENU_LIST_PLAIN); @@ -139,7 +140,8 @@ static int action_left_mainmenu(unsigned type, const char *label, if (list_size == 1) { menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); - if (menu_driver_list_get_selection() != 0) + if (menu_driver_list_get_selection() != 0 + || settings->menu.navigation.wraparound.horizontal_enable) push_list = 1; } else diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index 4d35f62aa9..2ebf5fd138 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -158,13 +158,15 @@ static int action_right_mainmenu(unsigned type, const char *label, unsigned push_list = 0; file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(); file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(); + settings_t *settings = config_get_ptr(); unsigned action = MENU_ACTION_RIGHT; size_t list_size = menu_driver_list_get_size(MENU_LIST_PLAIN); if (list_size == 1) { menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); - if (menu_driver_list_get_selection() != (menu_driver_list_get_size(MENU_LIST_HORIZONTAL) + 3)) + if (menu_driver_list_get_selection() != (menu_driver_list_get_size(MENU_LIST_HORIZONTAL) + 3) + || settings->menu.navigation.wraparound.horizontal_enable) push_list = 1; } else diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 93656d89cf..bd00dd26e3 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2442,6 +2442,7 @@ static void xmb_list_cache(menu_list_type_t type, unsigned action) size_t stack_size, list_size, selection; xmb_handle_t *xmb = NULL; menu_handle_t *menu = menu_driver_get_ptr(); + settings_t *settings = config_get_ptr(); file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(); file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(); @@ -2459,6 +2460,8 @@ static void xmb_list_cache(menu_list_type_t type, unsigned action) xmb_list_deep_copy(menu, menu_stack, xmb->menu_stack_old); xmb->selection_ptr_old = selection; + list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL) + XMB_SYSTEM_TAB_END; + switch (type) { case MENU_LIST_PLAIN: @@ -2469,20 +2472,25 @@ static void xmb_list_cache(menu_list_type_t type, unsigned action) switch (action) { case MENU_ACTION_LEFT: - xmb->categories.selection_ptr--; + if (xmb->categories.selection_ptr == 0) + { + xmb->categories.selection_ptr = list_size; + xmb->categories.active.idx = list_size - 1; + } + else + xmb->categories.selection_ptr--; break; default: - xmb->categories.selection_ptr++; + if (xmb->categories.selection_ptr == list_size) + { + xmb->categories.selection_ptr = 0; + xmb->categories.active.idx = 1; + } + else + xmb->categories.selection_ptr++; break; } - list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL) + XMB_SYSTEM_TAB_END; - if (xmb->categories.selection_ptr > list_size) - { - xmb->categories.selection_ptr = list_size; - return; - } - stack_size = menu_stack->size; if (menu_stack->list[stack_size - 1].label)