mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-05 01:16:38 +00:00
Add RARCH_MENU_CTL_LIST_CACHE
This commit is contained in:
parent
f2952c530c
commit
b48c900129
@ -2622,10 +2622,14 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
break;
|
||||
case DISPLAYLIST_GENERIC:
|
||||
{
|
||||
menu_ctx_list_t list_info;
|
||||
bool refresh = false;
|
||||
bool pending_push = true;
|
||||
|
||||
menu_driver_list_cache(MENU_LIST_PLAIN, 0);
|
||||
list_info.type = MENU_LIST_PLAIN;
|
||||
list_info.action = 0;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_CACHE, &list_info);
|
||||
|
||||
menu_entries_push(info->list, info->path, info->label, info->type, info->directory_ptr, 0);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_CLEAR, &pending_push);
|
||||
|
@ -138,7 +138,8 @@ enum rarch_menu_ctl_state
|
||||
RARCH_MENU_CTL_LIST_SET_SELECTION,
|
||||
RARCH_MENU_CTL_POPULATE_ENTRIES,
|
||||
RARCH_MENU_CTL_FIND_DRIVER,
|
||||
RARCH_MENU_CTL_LOAD_IMAGE
|
||||
RARCH_MENU_CTL_LOAD_IMAGE,
|
||||
RARCH_MENU_CTL_LIST_CACHE
|
||||
};
|
||||
|
||||
typedef enum
|
||||
@ -321,6 +322,12 @@ typedef struct menu_ctx_load_image
|
||||
menu_image_type_t type;
|
||||
} menu_ctx_load_image_t;
|
||||
|
||||
typedef struct menu_ctx_list
|
||||
{
|
||||
menu_list_type_t type;
|
||||
unsigned action;
|
||||
} menu_ctx_list_t;
|
||||
|
||||
extern menu_ctx_driver_t menu_ctx_xui;
|
||||
extern menu_ctx_driver_t menu_ctx_rgui;
|
||||
extern menu_ctx_driver_t menu_ctx_mui;
|
||||
@ -360,7 +367,6 @@ const char* config_get_menu_driver_options(void);
|
||||
menu_handle_t *menu_driver_get_ptr(void);
|
||||
|
||||
|
||||
void menu_driver_list_cache(menu_list_type_t type, unsigned action);
|
||||
|
||||
void menu_driver_list_free(file_list_t *list, size_t i, size_t list_size);
|
||||
|
||||
|
@ -156,6 +156,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)
|
||||
{
|
||||
menu_ctx_list_t list_info;
|
||||
bool refresh = false;
|
||||
file_list_t *menu_list = NULL;
|
||||
if (!list)
|
||||
@ -166,7 +167,10 @@ static bool menu_list_pop_stack(menu_list_t *list, size_t idx, size_t *directory
|
||||
if (menu_list_get_stack_size(list, idx) <= 1)
|
||||
return false;
|
||||
|
||||
menu_driver_list_cache(MENU_LIST_PLAIN, 0);
|
||||
list_info.type = MENU_LIST_PLAIN;
|
||||
list_info.action = 0;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_CACHE, &list_info);
|
||||
|
||||
if (menu_list->size != 0)
|
||||
menu_driver_list_free(menu_list, menu_list->size - 1, menu_list->size - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user