diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 353b3c6ca6..7e8b8c00ef 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -9353,6 +9353,18 @@ static enum menu_action materialui_parse_menu_entry_action( materialui_switch_tabs(mui, main_menu_tab, MENU_ACTION_NOOP); new_action = MENU_ACTION_NOOP; } + else if (main_menu_tab_index == mui->nav_bar.active_menu_tab_index) + { + /* Jump to first item on Main Menu */ + menu_navigation_set_selection(0); + materialui_navigation_set(mui, true); + } + } + else if (materialui_list_get_size(mui, MENU_LIST_PLAIN) == 1) + { + /* Jump to first item on current menu */ + menu_navigation_set_selection(0); + materialui_navigation_set(mui, true); } break; default: diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c index a4fb321b28..b40707262a 100644 --- a/menu/drivers/ozone.c +++ b/menu/drivers/ozone.c @@ -8062,6 +8062,12 @@ static enum menu_action ozone_parse_menu_entry_action( audio_driver_mixer_play_scroll_sound(true); #endif } + else + { + /* Jump to first item on Main Menu */ + ozone->tab_selection[ozone->categories_selection_ptr] = 0; + menu_navigation_set_selection(0); + } new_action = MENU_ACTION_ACCESSIBILITY_SPEAK_TITLE; break; diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 7f2521725a..1c64a43422 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -7873,6 +7873,13 @@ static enum menu_action rgui_parse_menu_entry_action( rgui_toggle_fs_thumbnail(rgui, config_get_ptr()->bools.menu_rgui_inline_thumbnails); new_action = MENU_ACTION_NOOP; } + + if (string_is_equal(rgui->menu_title, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MAIN_MENU))) + { + /* Jump to first item on Main Menu */ + menu_navigation_set_selection(0); + new_action = MENU_ACTION_NOOP; + } break; case MENU_ACTION_START: /* Playlist thumbnail fullscreen toggle */ diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index b23638aa4e..90f8ee6e2e 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2089,6 +2089,9 @@ static void xmb_list_switch_horizontal_list(xmb_handle_t *xmb) iz = xmb->categories_active_zoom; } + if (!xmb->allow_horizontal_animation) + continue; + /* Horizontal icon animation */ entry.target_value = ia; @@ -4463,6 +4466,10 @@ static bool INLINE xmb_fullscreen_thumbnails_available(xmb_handle_t *xmb) extern int action_switch_thumbnail(const char *path, const char *label, unsigned type, size_t idx); +static int xmb_menu_entry_action( + void *userdata, menu_entry_t *entry, + size_t i, enum menu_action action); + static enum menu_action xmb_parse_menu_entry_action( xmb_handle_t *xmb, enum menu_action action) { @@ -4598,6 +4605,41 @@ static enum menu_action xmb_parse_menu_entry_action( xmb->want_fullscreen_thumbnails = false; return MENU_ACTION_NOOP; } + + /* Back up to Main Menu and first item */ + if (menu_entries_get_stack_size(0) == 1) + { + if (xmb_get_system_tab(xmb, + (unsigned)xmb->categories_selection_ptr) == XMB_SYSTEM_TAB_MAIN) + { + /* Jump to first item on Main Menu */ + menu_navigation_set_selection(0); + xmb_selection_pointer_changed(xmb, true); + } + else + { + /* Jump to Main Menu */ + size_t i = 0; + size_t current_tab = xmb->categories_selection_ptr; + + menu_entry_t entry; + MENU_ENTRY_INITIALIZE(entry); + menu_entry_get(&entry, 0, menu_navigation_get_selection(), NULL, true); + + /* Icon animations get stuck if they happen too fast, + therefore allow it only on the last action */ + xmb->allow_horizontal_animation = false; + for (i = 0; i < current_tab; i++) + { + if (i == current_tab - 1) + xmb->allow_horizontal_animation = true; + + xmb_menu_entry_action(xmb, + &entry, menu_navigation_get_selection(), MENU_ACTION_LEFT); + } + } + return MENU_ACTION_NOOP; + } break; case MENU_ACTION_UP: case MENU_ACTION_DOWN: