diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 775e761416..2815b542a6 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -8409,7 +8409,7 @@ static void materialui_navigation_set(void *data, bool scroll) struct menu_state *menu_st = menu_state_get_ptr(); size_t selection = menu_st->selection_ptr; - if (!mui || !scroll) + if (!mui) return; if (mui->flags & MUI_FLAG_IS_PLAYLIST) @@ -8421,6 +8421,9 @@ static void materialui_navigation_set(void *data, bool scroll) else if (string_is_equal(mui->menu_title, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS))) mui->settings_selection_ptr = selection; + if (!scroll) + return; + materialui_animate_scroll( mui, materialui_get_scroll(mui, p_disp), @@ -10249,8 +10252,8 @@ static int materialui_pointer_up(void *userdata, } /* If this is not a playlist or file list, a tap/press * anywhere on the header triggers a MENU_ACTION_CANCEL - * action */ - else + * action unless already at root depth */ + else if (MENU_LIST_GET_STACK_SIZE(menu_st->entries.list, 0) > 1) return materialui_menu_entry_action(mui, entry, selection, MENU_ACTION_CANCEL); } /* Tap/press menu item: Activate and/or select item */ @@ -10307,6 +10310,9 @@ static int materialui_pointer_up(void *userdata, if (ptr != selection) menu_st->selection_ptr = ptr; + /* Set navigation for selection remembering */ + materialui_navigation_set(mui, false); + /* Perform a MENU_ACTION_SELECT on currently * active item * > Note that we still use 'selection'