Add DISPLAYLIST_CUSTOM_BIND

This commit is contained in:
twinaphex 2015-05-17 03:38:15 +02:00
parent d5056a3251
commit 43fa78f58b
3 changed files with 20 additions and 9 deletions

View File

@ -1785,6 +1785,11 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
{
case DISPLAYLIST_NONE:
break;
case DISPLAYLIST_CUSTOM_BIND:
menu_list_push(info->list,
info->path, info->label, info->type,
info->flags);
break;
case DISPLAYLIST_MAIN_MENU:
case DISPLAYLIST_SETTINGS:
ret = menu_displaylist_parse_settings(menu, info, info->flags);

View File

@ -31,6 +31,7 @@ enum
{
DISPLAYLIST_NONE = 0,
DISPLAYLIST_MAIN_MENU,
DISPLAYLIST_CUSTOM_BIND,
DISPLAYLIST_SETTINGS,
DISPLAYLIST_SETTINGS_ALL,
DISPLAYLIST_SETTINGS_SUBGROUP,

View File

@ -375,6 +375,7 @@ int menu_input_set_keyboard_bind_mode(void *data,
settings_t *settings = config_get_ptr();
menu_handle_t *menu = menu_driver_get_ptr();
menu_navigation_t *nav = menu_navigation_get_ptr();
menu_displaylist_info_t info = {0};
if (!menu || !setting)
return -1;
@ -393,21 +394,25 @@ int menu_input_set_keyboard_bind_mode(void *data,
menu->binds.last = setting->bind_type;
menu->binds.target = keybind;
menu->binds.user = setting->index_offset;
menu_list_push( menu->menu_list->menu_stack,
"", "custom_bind",
MENU_SETTINGS_CUSTOM_BIND_KEYBOARD,
nav->selection_ptr);
info.list = menu->menu_list->menu_stack;
strlcpy(info.label, "custom_bind", sizeof(info.label));
info.type = MENU_SETTINGS_CUSTOM_BIND_KEYBOARD;
info.flags = nav->selection_ptr;
menu_displaylist_push_list(&info, DISPLAYLIST_CUSTOM_BIND);
break;
case MENU_INPUT_BIND_ALL:
menu->binds.target = &settings->input.binds
[setting->index_offset][0];
menu->binds.begin = MENU_SETTINGS_BIND_BEGIN;
menu->binds.last = MENU_SETTINGS_BIND_LAST;
menu_list_push( menu->menu_list->menu_stack,
"",
"custom_bind_all",
MENU_SETTINGS_CUSTOM_BIND_KEYBOARD,
nav->selection_ptr);
info.list = menu->menu_list->menu_stack;
strlcpy(info.label, "custom_bind_all", sizeof(info.label));
info.type = MENU_SETTINGS_CUSTOM_BIND_KEYBOARD;
info.flags = nav->selection_ptr;
menu_displaylist_push_list(&info, DISPLAYLIST_CUSTOM_BIND);
break;
}