static int action_right_mainmenu(unsigned type, const char *label, bool wraparound) { menu_ctx_list_t list_info; menu_driver_list_get_selection(&list_info); list_info.type = MENU_LIST_PLAIN; menu_driver_list_get_size(&list_info); if (list_info.size == 1) { menu_ctx_list_t list_horiz_info; menu_ctx_list_t list_tabs_info; settings_t *settings = config_get_ptr(); list_horiz_info.type = MENU_LIST_HORIZONTAL; list_tabs_info.type = MENU_LIST_TABS; menu_driver_list_get_size(&list_horiz_info); menu_driver_list_get_size(&list_tabs_info); if ((list_info.selection != (list_horiz_info.size + list_tabs_info.size)) || settings->bools.menu_navigation_wraparound_enable) return action_right_goto_tab(); } else action_right_scroll(0, "", false); return 0; }
static int action_right_mainmenu(unsigned type, const char *label, bool wraparound) { size_t selection = 0; menu_file_list_cbs_t *cbs = NULL; 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(); 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) + 1)) push_list = 1; } else push_list = 2; menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection); cbs = menu_entries_get_actiondata_at_offset(selection_buf, selection); switch (push_list) { case 1: menu_driver_list_cache(MENU_LIST_HORIZONTAL, action); if (cbs && cbs->action_content_list_switch) return cbs->action_content_list_switch(selection_buf, menu_stack, "", "", 0); break; case 2: action_right_scroll(0, "", false); break; case 0: default: break; } return 0; }
static int action_right_mainmenu(unsigned type, const char *label, bool wraparound) { menu_file_list_cbs_t *cbs = NULL; unsigned push_list = 0; menu_list_t *menu_list = menu_list_get_ptr(); menu_navigation_t *nav = menu_navigation_get_ptr(); unsigned action = MENU_ACTION_RIGHT; size_t list_size = menu_driver_list_get_size(MENU_LIST_PLAIN); if (list_size == 1) { nav->selection_ptr = 0; if (menu_driver_list_get_selection() != (menu_driver_list_get_size(MENU_LIST_HORIZONTAL))) push_list = 1; } else push_list = 2; cbs = menu_list_get_actiondata_at_offset(menu_list->selection_buf, nav->selection_ptr); switch (push_list) { case 1: menu_driver_list_cache(MENU_LIST_HORIZONTAL, action); if (cbs && cbs->action_content_list_switch) return cbs->action_content_list_switch( menu_list->selection_buf, menu_list->menu_stack, "", "", 0); break; case 2: action_right_scroll(0, "", false); break; case 0: default: break; } return 0; }
static int action_right_mainmenu(unsigned type, const char *label, bool wraparound) { menu_ctx_list_t list_info; size_t selection = 0; menu_file_list_cbs_t *cbs = NULL; unsigned push_list = 0; file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0); file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0); settings_t *settings = config_get_ptr(); unsigned action = MENU_ACTION_RIGHT; menu_driver_ctl(RARCH_MENU_CTL_LIST_GET_SELECTION, &list_info); list_info.type = MENU_LIST_PLAIN; menu_driver_ctl(RARCH_MENU_CTL_LIST_GET_SIZE, &list_info); if (list_info.size == 1) { menu_ctx_list_t list_horiz_info; menu_ctx_list_t list_tabs_info; list_horiz_info.type = MENU_LIST_HORIZONTAL; list_tabs_info.type = MENU_LIST_TABS; menu_driver_ctl(RARCH_MENU_CTL_LIST_GET_SIZE, &list_horiz_info); menu_driver_ctl(RARCH_MENU_CTL_LIST_GET_SIZE, &list_tabs_info); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); if ((list_info.selection != (list_horiz_info.size + list_tabs_info.size)) || settings->menu.navigation.wraparound.enable) push_list = 1; } else push_list = 2; menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection); cbs = menu_entries_get_actiondata_at_offset(selection_buf, selection); switch (push_list) { case 1: { menu_ctx_list_t list_info; list_info.type = MENU_LIST_HORIZONTAL; list_info.action = action; menu_driver_ctl(RARCH_MENU_CTL_LIST_CACHE, &list_info); if (cbs && cbs->action_content_list_switch) return cbs->action_content_list_switch(selection_buf, menu_stack, "", "", 0); } break; case 2: action_right_scroll(0, "", false); break; case 0: default: break; } return 0; }