1
0
mirror of https://github.com/libretro/RetroArch synced 2025-04-03 01:21:10 +00:00

Use menu_displaylist_push_list

This commit is contained in:
twinaphex 2015-05-18 20:53:23 +02:00
parent e78d5f0034
commit c33b7676c6

@ -370,6 +370,7 @@ static bool menu_input_custom_bind_keyboard_cb(void *data, unsigned code)
static int menu_input_set_bind_mode_common(rarch_setting_t *setting, static int menu_input_set_bind_mode_common(rarch_setting_t *setting,
enum menu_input_bind_mode type) enum menu_input_bind_mode type)
{ {
menu_displaylist_info_t info = {0};
struct retro_keybind *keybind = NULL; struct retro_keybind *keybind = NULL;
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
menu_handle_t *menu = menu_driver_get_ptr(); menu_handle_t *menu = menu_driver_get_ptr();
@ -392,21 +393,26 @@ static int menu_input_set_bind_mode_common(rarch_setting_t *setting,
menu->binds.last = setting->bind_type; menu->binds.last = setting->bind_type;
menu->binds.target = keybind; menu->binds.target = keybind;
menu->binds.user = setting->index_offset; menu->binds.user = setting->index_offset;
menu_list_push( menu->menu_list->menu_stack,
"", "custom_bind", info.list = menu->menu_list->menu_stack;
MENU_SETTINGS_CUSTOM_BIND_KEYBOARD, info.type = MENU_SETTINGS_CUSTOM_BIND_KEYBOARD;
nav->selection_ptr); info.directory_ptr = nav->selection_ptr;
strlcpy(info.label, "custom_bind", sizeof(info.label));
menu_displaylist_push_list(&info, DISPLAYLIST_SELECT);
break; break;
case MENU_INPUT_BIND_ALL: case MENU_INPUT_BIND_ALL:
menu->binds.target = &settings->input.binds menu->binds.target = &settings->input.binds
[setting->index_offset][0]; [setting->index_offset][0];
menu->binds.begin = MENU_SETTINGS_BIND_BEGIN; menu->binds.begin = MENU_SETTINGS_BIND_BEGIN;
menu->binds.last = MENU_SETTINGS_BIND_LAST; menu->binds.last = MENU_SETTINGS_BIND_LAST;
menu_list_push( menu->menu_list->menu_stack,
"", info.list = menu->menu_list->menu_stack;
"custom_bind_all", info.type = MENU_SETTINGS_CUSTOM_BIND_KEYBOARD;
MENU_SETTINGS_CUSTOM_BIND_KEYBOARD, info.directory_ptr = nav->selection_ptr;
nav->selection_ptr); strlcpy(info.label, "custom_bind_all", sizeof(info.label));
menu_displaylist_push_list(&info, DISPLAYLIST_SELECT);
break; break;
} }
return 0; return 0;