mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Reimplement deferred core list push list
This commit is contained in:
parent
6b12a9fed2
commit
eb347b0d4e
@ -171,7 +171,7 @@ void menu_entries_push(
|
||||
driver.menu->need_refresh = true;
|
||||
}
|
||||
|
||||
static int push_list(menu_handle_t *menu,
|
||||
int push_list(menu_handle_t *menu,
|
||||
file_list_t *list,
|
||||
const char *path, const char *label,
|
||||
unsigned menu_type)
|
||||
@ -743,9 +743,6 @@ static int menu_parse_check(const char *label, unsigned menu_type)
|
||||
!strcmp(label, "core_list") ||
|
||||
!strcmp(label, "configurations") ||
|
||||
!strcmp(label, "disk_image_append"))));
|
||||
if (check)
|
||||
return -1;
|
||||
check = !strcmp(label, "deferred_core_list");
|
||||
if (check)
|
||||
return -1;
|
||||
return 0;
|
||||
|
@ -45,6 +45,11 @@ void menu_flush_stack_label(file_list_t *list, const char *needle);
|
||||
|
||||
bool menu_entries_init(menu_handle_t *menu);
|
||||
|
||||
int push_list(menu_handle_t *menu,
|
||||
file_list_t *list,
|
||||
const char *path, const char *label,
|
||||
unsigned menu_type);
|
||||
|
||||
void entries_refresh(file_list_t *list);
|
||||
|
||||
void menu_build_scroll_indices(file_list_t *list);
|
||||
|
@ -1310,6 +1310,20 @@ static int action_start_bind(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_core_list_deferred(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_core_list(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
@ -1758,7 +1772,9 @@ static void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||
|
||||
cbs->action_deferred_push = deferred_push_default;
|
||||
|
||||
if (!strcmp(label, "core_list"))
|
||||
if (!strcmp(label, "deferred_core_list"))
|
||||
cbs->action_deferred_push = deferred_push_core_list_deferred;
|
||||
else if (!strcmp(label, "core_list"))
|
||||
cbs->action_deferred_push = deferred_push_core_list;
|
||||
else if (!strcmp(label, "history_list"))
|
||||
cbs->action_deferred_push = deferred_push_history_list;
|
||||
|
Loading…
x
Reference in New Issue
Block a user