From 7ea16f622ea758f448df24e1d9bf8edde891055c Mon Sep 17 00:00:00 2001 From: twinaphex <libretro@gmail.com> Date: Thu, 22 Oct 2015 04:46:05 +0200 Subject: [PATCH] (XMB) Create custom Main Menu list --- input/input_autodetect.c | 4 ++++ menu/drivers/xmb.c | 47 +++++++++++++++++++++++++++++++++++++++- menu/menu_displaylist.c | 1 + menu/menu_setting.c | 6 +++-- 4 files changed, 55 insertions(+), 3 deletions(-) diff --git a/input/input_autodetect.c b/input/input_autodetect.c index b442915073..b3e7211ba7 100644 --- a/input/input_autodetect.c +++ b/input/input_autodetect.c @@ -104,7 +104,9 @@ static int input_try_autoconfigure_joypad_from_conf(config_file_t *conf, #endif } } +#if 0 RARCH_LOG("Autodetect: configuration file: %s score: %d\n", conf->path, score); +#endif return score; } @@ -158,7 +160,9 @@ static void input_autoconfigure_joypad_add( rarch_main_msg_queue_push(msg, 0, 60, false); } +#if 0 RARCH_LOG("Autodetect: %s\n", msg); +#endif } #if defined(HAVE_BUILTIN_AUTOCONFIG) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index bce269e4f0..d5dda4d392 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2592,7 +2592,52 @@ static int xmb_list_bind_init(menu_file_list_cbs_t *cbs, static int xmb_list_push(menu_displaylist_info_t *info, unsigned type) { - return -1; + int ret = -1; + menu_handle_t *menu = menu_driver_get_ptr(); + + switch (type) + { + case DISPLAYLIST_MAIN_MENU: + menu_entries_clear(info->list); + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS), PARSE_ACTION); +#if defined(HAVE_DYNAMIC) || defined(HAVE_LIBRETRO_MANAGEMENT) + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_CORE_LIST), PARSE_ACTION); +#endif + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_LOAD_CONTENT_LIST), PARSE_ACTION); + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_LOAD_CONTENT_HISTORY), PARSE_ACTION); +#if defined(HAVE_NETWORKING) +#if defined(HAVE_LIBRETRODB) + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_ADD_CONTENT_LIST), PARSE_ACTION); +#endif + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_ONLINE_UPDATER), PARSE_ACTION); +#endif + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_INFORMATION_LIST), PARSE_ACTION); +#ifndef HAVE_DYNAMIC + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_RESTART_RETROARCH), PARSE_ACTION); +#endif + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_CONFIGURATIONS), PARSE_ACTION); + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_SAVE_NEW_CONFIG), PARSE_ACTION); + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_HELP_LIST), PARSE_ACTION); +#if !defined(IOS) + menu_displaylist_parse_settings(menu, info, + menu_hash_to_str(MENU_LABEL_QUIT_RETROARCH), PARSE_ACTION); +#endif + info->need_push = true; + ret = 0; + break; + } + return ret; } static bool xmb_menu_init_list(void *data) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 6632e63018..26b062adec 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1521,6 +1521,7 @@ int menu_displaylist_parse_settings(void *data, menu_displaylist_info_t *info, !settings->menu.show_advanced_settings) goto loop; + menu_entries_push(info->list, short_description, name, menu_setting_set_flags(setting), 0, 0); count++; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 0032d0e8ed..54594f9b14 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -2871,7 +2871,10 @@ static bool setting_append_list_main_menu_options( parent_group); } -#if defined(HAVE_NETWORKING) || defined(HAVE_LIBRETRODB) + +#if defined(HAVE_NETWORKING) + +#if defined(HAVE_LIBRETRODB) CONFIG_ACTION( menu_hash_to_str(MENU_LABEL_ADD_CONTENT_LIST), menu_hash_to_str(MENU_LABEL_VALUE_ADD_CONTENT_LIST), @@ -2880,7 +2883,6 @@ static bool setting_append_list_main_menu_options( parent_group); #endif -#ifdef HAVE_NETWORKING CONFIG_ACTION( menu_hash_to_str(MENU_LABEL_ONLINE_UPDATER), menu_hash_to_str(MENU_LABEL_VALUE_ONLINE_UPDATER),