diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 69d00dabb1..163824c796 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -675,7 +675,7 @@ static int action_ok_playlist_entry(const char *path, { case MENU_LABEL_COLLECTION: case MENU_LABEL_RDB_ENTRY_START_CONTENT: - menu_entries_pop_stack(&selection, 0); + menu_entries_pop_stack(&selection, 0, 1); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); break; @@ -1113,7 +1113,7 @@ static int action_ok_core_deferred_set(const char *path, content_playlist_write_file(playlist); - menu_entries_pop_stack(&selection, 0); + menu_entries_pop_stack(&selection, 0, 1); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); return menu_cbs_exit(); diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index ad46ef3342..4e8efe95d8 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -1496,7 +1496,7 @@ static int mui_pointer_tap(void *userdata, if (y < header_height) { - menu_entries_pop_stack(&selection, 0); + menu_entries_pop_stack(&selection, 0, 1); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); } else if (y > height - mui->tabs_height) diff --git a/menu/drivers/menu_generic.c b/menu/drivers/menu_generic.c index 75ca198ff9..7c4ce90f49 100644 --- a/menu/drivers/menu_generic.c +++ b/menu/drivers/menu_generic.c @@ -313,7 +313,7 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action) if (menu_input_ctl(MENU_INPUT_CTL_BIND_ITERATE, &bind)) { - menu_entries_pop_stack(&selection, 0); + menu_entries_pop_stack(&selection, 0, 0); menu_navigation_ctl( MENU_NAVIGATION_CTL_SET_SELECTION, &selection); } @@ -378,7 +378,7 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action) if (BIT64_GET(menu->state, MENU_STATE_POP_STACK)) { size_t new_selection_ptr = selection; - menu_entries_pop_stack(&new_selection_ptr, 0); + menu_entries_pop_stack(&new_selection_ptr, 0, 0); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); } diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 8f2406390c..af61143d14 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -863,7 +863,7 @@ static int rgui_pointer_tap(void *data, if (y < header_height) { - menu_entries_pop_stack(&selection, 0); + menu_entries_pop_stack(&selection, 0, 1); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); } else if (ptr <= (menu_entries_get_size() - 1)) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 96f55944ca..ce5c07cc1f 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -3162,7 +3162,7 @@ static int xmb_pointer_tap(void *userdata, if (y < header_height) { - menu_entries_pop_stack(&selection, 0); + menu_entries_pop_stack(&selection, 0, 1); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); } else if (ptr <= (menu_entries_get_size() - 1)) diff --git a/menu/menu_entries.c b/menu/menu_entries.c index 3c449debbf..9b430e2c26 100644 --- a/menu/menu_entries.c +++ b/menu/menu_entries.c @@ -163,7 +163,7 @@ static int menu_entries_flush_stack_type(const char *needle, const char *label, } static bool menu_list_pop_stack(menu_list_t *list, - size_t idx, size_t *directory_ptr) + size_t idx, size_t *directory_ptr, bool animate) { menu_ctx_list_t list_info; bool refresh = false; @@ -179,7 +179,8 @@ static bool menu_list_pop_stack(menu_list_t *list, list_info.type = MENU_LIST_PLAIN; list_info.action = 0; - menu_driver_ctl(RARCH_MENU_CTL_LIST_CACHE, &list_info); + if (animate) + menu_driver_ctl(RARCH_MENU_CTL_LIST_CACHE, &list_info); if (menu_list->size != 0) { @@ -194,7 +195,8 @@ static bool menu_list_pop_stack(menu_list_t *list, file_list_pop(menu_list, directory_ptr); menu_driver_ctl(RARCH_MENU_CTL_LIST_SET_SELECTION, menu_list); - menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh); + if (animate) + menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh); return true; } @@ -222,7 +224,7 @@ static void menu_list_flush_stack(menu_list_t *list, menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &new_selection_ptr); - if (!menu_list_pop_stack(list, idx, &new_selection_ptr)) + if (!menu_list_pop_stack(list, idx, &new_selection_ptr, 1)) break; menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, @@ -598,12 +600,12 @@ void menu_entries_flush_stack(const char *needle, unsigned final_type) menu_list_flush_stack(menu_list, 0, needle, final_type); } -void menu_entries_pop_stack(size_t *ptr, size_t idx) +void menu_entries_pop_stack(size_t *ptr, size_t idx, bool animate) { menu_list_t *menu_list = NULL; menu_entries_ctl(MENU_ENTRIES_CTL_LIST_GET, &menu_list); if (menu_list) - menu_list_pop_stack(menu_list, idx, ptr); + menu_list_pop_stack(menu_list, idx, ptr, animate); } size_t menu_entries_get_stack_size(size_t idx) diff --git a/menu/menu_entries.h b/menu/menu_entries.h index f53fd8aa64..fd5179a431 100644 --- a/menu/menu_entries.h +++ b/menu/menu_entries.h @@ -147,7 +147,7 @@ void menu_entries_get_last_stack(const char **path, const char **label, menu_file_list_cbs_t *menu_entries_get_last_stack_actiondata(void); -void menu_entries_pop_stack(size_t *ptr, size_t idx); +void menu_entries_pop_stack(size_t *ptr, size_t idx, bool animate); void menu_entries_flush_stack(const char *needle, unsigned final_type); diff --git a/menu/menu_entry.c b/menu/menu_entry.c index 56a8106fb1..4a1989ac75 100644 --- a/menu/menu_entry.c +++ b/menu/menu_entry.c @@ -39,7 +39,7 @@ int menu_entry_go_back(void) size_t new_selection_ptr; menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &new_selection_ptr); - menu_entries_pop_stack(&new_selection_ptr, 0); + menu_entries_pop_stack(&new_selection_ptr, 0, 1); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &new_selection_ptr); return 0; diff --git a/menu/menu_input.c b/menu/menu_input.c index 7312be6f95..9d1c03bfa8 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -880,7 +880,7 @@ static int menu_input_mouse_frame( if (BIT64_GET(input_mouse, MENU_MOUSE_ACTION_BUTTON_R)) { - menu_entries_pop_stack(&selection, 0); + menu_entries_pop_stack(&selection, 0, 1); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); } @@ -949,7 +949,7 @@ static int menu_input_mouse_post_iterate(uint64_t *input_mouse, /* Back button */ if ((unsigned)menu_input_mouse_state(MENU_MOUSE_X_AXIS) < header_height) { - menu_entries_pop_stack(&selection, 0); + menu_entries_pop_stack(&selection, 0, 1); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); return 0; } @@ -1180,7 +1180,7 @@ static int menu_input_pointer_post_iterate( if (!pointer_oldback) { pointer_oldback = true; - menu_entries_pop_stack(&selection, 0); + menu_entries_pop_stack(&selection, 0, 1); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); } }