diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index 5a4d1e445b..5484e1b2e1 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -165,7 +165,9 @@ static int action_right_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() != (menu_driver_list_get_size(MENU_LIST_HORIZONTAL) + 3) + if (menu_driver_list_get_selection() != + (menu_driver_list_get_size(MENU_LIST_HORIZONTAL) + + menu_driver_list_get_size(MENU_LIST_TABS)) || settings->menu.navigation.wraparound.enable) push_list = 1; } diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index 0f13da0575..cc50b488b0 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -603,12 +603,17 @@ static size_t glui_list_get_size(void *data, menu_list_type_t type) { size_t list_size = 0; - /*switch (type) + switch (type) { - case MENU_LIST_PLAIN:*/ + case MENU_LIST_PLAIN: list_size = menu_entries_get_stack_size(0); - /*break; - }*/ + break; + case MENU_LIST_TABS: + list_size = GLUI_SYSTEM_TAB_END; + break; + default: + break; + } return list_size; } @@ -1237,6 +1242,8 @@ static void glui_list_cache(menu_list_type_t type, unsigned action) break; } break; + default: + break; } } @@ -1300,6 +1307,17 @@ static int glui_list_push(menu_displaylist_info_t *info, unsigned type) return ret; } +static size_t glui_list_get_selection(void *data) +{ + menu_handle_t *menu = (menu_handle_t*)data; + glui_handle_t *glui = menu ? (glui_handle_t*)menu->userdata : NULL; + + if (!glui) + return 0; + + return glui->categories.selection_ptr; +} + menu_ctx_driver_t menu_ctx_glui = { NULL, glui_get_message, @@ -1325,7 +1343,7 @@ menu_ctx_driver_t menu_ctx_glui = { NULL, glui_list_cache, glui_list_push, - NULL, + glui_list_get_selection, glui_list_get_size, NULL, glui_list_set_selection, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index d3e70a06a0..f1e0ad02ce 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -312,6 +312,8 @@ static size_t xmb_list_get_size(void *data, menu_list_type_t type) if (xmb && xmb->horizontal_list) list_size = file_list_get_size(xmb->horizontal_list); break; + case MENU_LIST_TABS: + list_size = XMB_SYSTEM_TAB_END; } return list_size; @@ -338,6 +340,8 @@ static void *xmb_list_get_entry(void *data, menu_list_type_t type, unsigned i) if (i < list_size) ptr = (void*)&xmb->horizontal_list->list[i]; break; + default: + break; } return ptr; @@ -2584,6 +2588,8 @@ static void xmb_list_cache(menu_list_type_t type, unsigned action) break; } break; + default: + break; } } diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 6c7f4a18fc..cd30c417b8 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1604,7 +1604,8 @@ static int menu_displaylist_parse_horizontal_list(menu_displaylist_info_t *info) settings_t *settings = config_get_ptr(); menu_handle_t *menu = menu_driver_get_ptr(); struct item_file *item = (struct item_file*) - menu_driver_list_get_entry(MENU_LIST_HORIZONTAL, menu_driver_list_get_selection() - 4); + menu_driver_list_get_entry(MENU_LIST_HORIZONTAL, + menu_driver_list_get_selection() - (menu_driver_list_get_size(MENU_LIST_TABS)+1)); if (!item) return -1; diff --git a/menu/menu_entries.h b/menu/menu_entries.h index 07f4d24141..14ac995be6 100644 --- a/menu/menu_entries.h +++ b/menu/menu_entries.h @@ -31,7 +31,8 @@ extern "C" { typedef enum { MENU_LIST_PLAIN = 0, - MENU_LIST_HORIZONTAL + MENU_LIST_HORIZONTAL, + MENU_LIST_TABS } menu_list_type_t; typedef struct menu_file_list_cbs