(XMB) Start implementing 'bind_init' for XMB

This commit is contained in:
twinaphex 2015-06-08 16:13:02 +02:00
parent 79a8aa70a3
commit 7d9e7e3139
2 changed files with 24 additions and 9 deletions

View File

@ -265,11 +265,6 @@ static int deferred_push_history_list(menu_displaylist_info_t *info)
return menu_displaylist_push_list(info, DISPLAYLIST_HISTORY);
}
static int deferred_push_content_actions(menu_displaylist_info_t *info)
{
return menu_displaylist_push_list(info, DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS);
}
int deferred_push_content_list(void *data, void *userdata, const char *path,
const char *label, unsigned type)
{
@ -485,9 +480,6 @@ static int menu_entries_cbs_init_bind_deferred_push_compare_label(menu_file_list
case MENU_LABEL_RECORD_CONFIG:
cbs->action_deferred_push = deferred_push_record_configfile;
break;
case MENU_LABEL_CONTENT_ACTIONS:
cbs->action_deferred_push = deferred_push_content_actions;
break;
case MENU_LABEL_SHADER_OPTIONS:
cbs->action_deferred_push = deferred_push_shader_options;
break;

View File

@ -2094,12 +2094,35 @@ static void xmb_toggle(bool menu_on)
xmb_toggle_horizontal_list(xmb, menu);
}
static int deferred_push_content_actions(menu_displaylist_info_t *info)
{
return menu_displaylist_push_list(info, DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS);
}
static int xmb_list_bind_init_compare_label(menu_file_list_cbs_t *cbs,
uint32_t label_hash)
{
switch (label_hash)
{
case MENU_LABEL_CONTENT_ACTIONS:
cbs->action_deferred_push = deferred_push_content_actions;
break;
default:
return -1;
}
return 0;
}
static int xmb_list_bind_init(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)
{
return 0;
if (xmb_list_bind_init_compare_label(cbs, label_hash) == 0)
return 0;
return -1;
}
menu_ctx_driver_t menu_ctx_xmb = {