mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
(menu_entries_cbs_defered_push.c) Cleanups
This commit is contained in:
parent
45bc4ce3be
commit
64e7376046
@ -450,41 +450,8 @@ static int deferred_push_default(menu_displaylist_info_t *info)
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_DEFAULT);
|
||||
}
|
||||
|
||||
void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!cbs)
|
||||
return;
|
||||
|
||||
cbs->action_deferred_push = deferred_push_default;
|
||||
|
||||
if ((strlen(elem1) != 0) && !!strcmp(elem0, elem1))
|
||||
{
|
||||
if (menu_entries_common_is_settings_entry(elem0))
|
||||
{
|
||||
if (!settings->menu.collapse_subgroups_enable)
|
||||
{
|
||||
cbs->action_deferred_push = deferred_push_settings_subgroup;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strstr(label, "deferred_rdb_entry_detail"))
|
||||
{
|
||||
cbs->action_deferred_push = deferred_push_rdb_entry_detail;
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == MENU_SETTING_GROUP)
|
||||
cbs->action_deferred_push = deferred_push_category;
|
||||
else if (type == MENU_FILE_PLAYLIST_COLLECTION)
|
||||
cbs->action_deferred_push = deferred_push_rdb_collection;
|
||||
else
|
||||
int menu_entries_cbs_init_bind_deferred_push_compare_type(menu_file_list_cbs_t *cbs, unsigned type,
|
||||
uint32_t label_hash)
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
@ -632,6 +599,49 @@ void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||
case MENU_LABEL_DETECT_CORE_LIST:
|
||||
cbs->action_deferred_push = deferred_push_detect_core_list;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (type == MENU_SETTING_GROUP)
|
||||
cbs->action_deferred_push = deferred_push_category;
|
||||
else if (type == MENU_FILE_PLAYLIST_COLLECTION)
|
||||
cbs->action_deferred_push = deferred_push_rdb_collection;
|
||||
else
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!cbs)
|
||||
return;
|
||||
|
||||
cbs->action_deferred_push = deferred_push_default;
|
||||
|
||||
if ((strlen(elem1) != 0) && !!strcmp(elem0, elem1))
|
||||
{
|
||||
if (menu_entries_common_is_settings_entry(elem0))
|
||||
{
|
||||
if (!settings->menu.collapse_subgroups_enable)
|
||||
{
|
||||
cbs->action_deferred_push = deferred_push_settings_subgroup;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strstr(label, "deferred_rdb_entry_detail"))
|
||||
{
|
||||
cbs->action_deferred_push = deferred_push_rdb_entry_detail;
|
||||
return;
|
||||
}
|
||||
|
||||
menu_entries_cbs_init_bind_deferred_push_compare_type(cbs, type, label_hash);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user