From e286c5dda21d111f766d1c335f7e1204ec1dd46b Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 08:14:52 +0200 Subject: [PATCH 01/13] Implemented new settings menu view: User Interface -> Views -> Quick Menu. Implemented setting for showing/hiding the "Take Screenshot" option in the Quick Menu. --- config.def.h | 2 ++ configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 10 +++++++++- intl/msg_hash_cht.h | 10 +++++++++- intl/msg_hash_de.h | 8 ++++++++ intl/msg_hash_eo.h | 8 ++++++++ intl/msg_hash_fr.h | 8 ++++++++ intl/msg_hash_it.h | 8 ++++++++ intl/msg_hash_ja.h | 10 +++++++++- intl/msg_hash_ko.h | 10 +++++++++- intl/msg_hash_lbl.h | 4 ++++ intl/msg_hash_nl.h | 8 ++++++++ intl/msg_hash_pt_br.h | 12 ++++++++++++ intl/msg_hash_pt_pt.h | 8 ++++++++ intl/msg_hash_ru.h | 10 +++++++++- intl/msg_hash_us.h | 8 ++++++++ intl/msg_hash_vn.h | 10 +++++++++- menu/cbs/menu_cbs_deferred_push.c | 10 ++++++++++ menu/cbs/menu_cbs_ok.c | 12 ++++++++++++ menu/cbs/menu_cbs_sublabel.c | 8 ++++++++ menu/cbs/menu_cbs_title.c | 6 ++++++ menu/drivers/materialui.c | 2 ++ menu/menu_cbs.h | 1 + menu/menu_displaylist.c | 27 ++++++++++++++++++++++----- menu/menu_displaylist.h | 1 + menu/menu_setting.c | 23 +++++++++++++++++++++++ msg_hash.h | 3 +++ 28 files changed, 218 insertions(+), 11 deletions(-) diff --git a/config.def.h b/config.def.h index 418b48244c..d26f86fcfb 100644 --- a/config.def.h +++ b/config.def.h @@ -236,6 +236,8 @@ static const bool display_keyboard_overlay = false; static bool default_block_config_read = true; +static bool quick_menu_show_take_screenshot = true; + static bool menu_show_online_updater = true; #if defined(HAVE_LAKKA) || defined(VITA) diff --git a/configuration.c b/configuration.c index 37d11a47d2..20546133cd 100644 --- a/configuration.c +++ b/configuration.c @@ -1191,6 +1191,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("menu_battery_level_enable", &settings->bools.menu_battery_level_enable, true, true, false); SETTING_BOOL("menu_core_enable", &settings->bools.menu_core_enable, true, true, false); SETTING_BOOL("menu_dynamic_wallpaper_enable", &settings->bools.menu_dynamic_wallpaper_enable, true, false, false); + SETTING_BOOL("quick_menu_show_take_screenshot", &settings->bools.quick_menu_show_take_screenshot, true, quick_menu_show_take_screenshot, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index 92cb30c583..226fbc3acf 100644 --- a/configuration.h +++ b/configuration.h @@ -138,6 +138,7 @@ typedef struct settings bool menu_xmb_show_history; bool menu_xmb_show_add; bool menu_unified_controls; + bool quick_menu_show_take_screenshot; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index a4349587d8..5290359f20 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -1,4 +1,4 @@ -MSG_HASH( +MSG_HASH( MSG_COMPILER, "编译器" ) @@ -3063,3 +3063,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 10c8d09ed9..4c5a7ad886 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -1,4 +1,4 @@ -MSG_HASH( +MSG_HASH( MSG_COMPILER, "編譯器" ) @@ -3063,3 +3063,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 895c3b6603..df5e75169c 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3057,3 +3057,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index f66683ce80..310805cb68 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2926,3 +2926,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index c649015bad..c241169fd5 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3095,3 +3095,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 07bf6d836b..b505aaefff 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3149,3 +3149,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 5cfa72b792..e1174d2da8 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -1,4 +1,4 @@ -#if defined(_MSC_VER) && !defined(_XBOX) +#if defined(_MSC_VER) && !defined(_XBOX) /* https://support.microsoft.com/en-us/kb/980263 */ #pragma execution_character_set("utf-8") #endif @@ -3065,3 +3065,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "エントリーの名前変更を許す") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 8beb280dd3..8973cdc0ab 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -1,4 +1,4 @@ -MSG_HASH( +MSG_HASH( MSG_COMPILER, "컴파일러" ) @@ -3058,3 +3058,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 4f68ded6b4..c265e18154 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -303,6 +303,8 @@ MSG_HASH(MENU_ENUM_LABEL_DEFERRED_MENU_SETTINGS_LIST, "deferred_menu_settings_list") MSG_HASH(MENU_ENUM_LABEL_DEFERRED_MENU_VIEWS_SETTINGS_LIST, "deferred_menu_views_settings_list") +MSG_HASH(MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_VIEWS_SETTINGS_LIST, + "deferred_quick_menu_views_settings_list") MSG_HASH(MENU_ENUM_LABEL_DEFERRED_NETWORK_SETTINGS_LIST, "deferred_network_settings_list") MSG_HASH(MENU_ENUM_LABEL_DEFERRED_ONSCREEN_DISPLAY_SETTINGS_LIST, @@ -1305,3 +1307,5 @@ MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE, "materialui_icons_enable") MSG_HASH(MENU_ENUM_LABEL_RENAME_ENTRY, "rename_entry") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "quick_menu_show_take_screenshot") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index c169236324..06595aa29f 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2926,3 +2926,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 9bf4a82bdd..0f297b195d 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -3988,3 +3988,15 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries" ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen." + ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 2c884831fc..513940ab9f 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3033,3 +3033,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 0726662c72..8c09d29599 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -1,4 +1,4 @@ -#if defined(_MSC_VER) && !defined(_XBOX) +#if defined(_MSC_VER) && !defined(_XBOX) /* https://support.microsoft.com/en-us/kb/980263 */ #pragma execution_character_set("utf-8") #endif @@ -3116,3 +3116,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 38eb3ecdb9..c3d5c0b0cb 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3151,3 +3151,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_RENAME_ENTRY, "Rename the title of the entry.") MSG_HASH(MENU_ENUM_LABEL_VALUE_RENAME_ENTRY, "Rename") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index f829d18fc2..d152eb7f7e 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -1,4 +1,4 @@ -MSG_HASH( +MSG_HASH( MSG_COMPILER, "Compiler" ) @@ -3087,3 +3087,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, "Allow the user to rename entries in collections.") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Allow to rename entries") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + "Quick Menu") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, + "Show or hide elements on the Quick Menu screen.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show Take Screenshot") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + "Show/hide the 'Take Screenshot' option.") diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index 05d86c322e..8ab480aefd 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -173,6 +173,11 @@ static int deferred_push_menu_views_settings_list(menu_displaylist_info_t *info) return deferred_push_dlist(info, DISPLAYLIST_MENU_VIEWS_SETTINGS_LIST); } +static int deferred_push_quick_menu_views_settings_list(menu_displaylist_info_t *info) +{ + return deferred_push_dlist(info, DISPLAYLIST_QUICK_MENU_VIEWS_SETTINGS_LIST); +} + static int deferred_push_menu_settings_list(menu_displaylist_info_t *info) { return deferred_push_dlist(info, DISPLAYLIST_MENU_SETTINGS_LIST); @@ -1120,6 +1125,11 @@ static int menu_cbs_init_bind_deferred_push_compare_label( BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_menu_views_settings_list); return 0; } + else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_VIEWS_SETTINGS_LIST))) + { + BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_quick_menu_views_settings_list); + return 0; + } else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_MENU_SETTINGS_LIST))) { BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_menu_settings_list); diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index f4ff0bf626..d05c7c8277 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -727,6 +727,14 @@ int generic_action_ok_displaylist_push(const char *path, info.enum_idx = MENU_ENUM_LABEL_DEFERRED_MENU_VIEWS_SETTINGS_LIST; dl_type = DISPLAYLIST_GENERIC; break; + case ACTION_OK_DL_QUICK_MENU_VIEWS_SETTINGS_LIST: + info.directory_ptr = idx; + info.type = type; + info_path = path; + info_label = msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_VIEWS_SETTINGS_LIST); + info.enum_idx = MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_VIEWS_SETTINGS_LIST; + dl_type = DISPLAYLIST_GENERIC; + break; case ACTION_OK_DL_USER_INTERFACE_SETTINGS_LIST: info.directory_ptr = idx; info.type = type; @@ -3352,6 +3360,7 @@ default_action_ok_func(action_ok_onscreen_notifications_list, ACTION_OK_DL_ONSCR default_action_ok_func(action_ok_onscreen_overlay_list, ACTION_OK_DL_ONSCREEN_OVERLAY_SETTINGS_LIST) default_action_ok_func(action_ok_menu_list, ACTION_OK_DL_MENU_SETTINGS_LIST) default_action_ok_func(action_ok_menu_views_list, ACTION_OK_DL_MENU_VIEWS_SETTINGS_LIST) +default_action_ok_func(action_ok_quick_menu_views_list, ACTION_OK_DL_QUICK_MENU_VIEWS_SETTINGS_LIST) default_action_ok_func(action_ok_user_interface_list, ACTION_OK_DL_USER_INTERFACE_SETTINGS_LIST) default_action_ok_func(action_ok_menu_file_browser_list, ACTION_OK_DL_MENU_FILE_BROWSER_SETTINGS_LIST) default_action_ok_func(action_ok_retro_achievements_list, ACTION_OK_DL_RETRO_ACHIEVEMENTS_SETTINGS_LIST) @@ -4593,6 +4602,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_MENU_VIEWS_SETTINGS: BIND_ACTION_OK(cbs, action_ok_menu_views_list); break; + case MENU_ENUM_LABEL_QUICK_MENU_VIEWS_SETTINGS: + BIND_ACTION_OK(cbs, action_ok_quick_menu_views_list); + break; case MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS: BIND_ACTION_OK(cbs, action_ok_user_interface_list); break; diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index d9e2741f4f..f674137620 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -64,6 +64,7 @@ default_sublabel_macro(action_bind_sublabel_cheevos_test_unofficial, MENU_ default_sublabel_macro(action_bind_sublabel_cheevos_hardcore_mode_enable, MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE) default_sublabel_macro(action_bind_sublabel_cheevos_verbose_enable, MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE) default_sublabel_macro(action_bind_sublabel_menu_views_settings_list, MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS) +default_sublabel_macro(action_bind_sublabel_quick_menu_views_settings_list, MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS) default_sublabel_macro(action_bind_sublabel_menu_settings_list, MENU_ENUM_SUBLABEL_MENU_SETTINGS) default_sublabel_macro(action_bind_sublabel_video_settings_list, MENU_ENUM_SUBLABEL_VIDEO_SETTINGS) default_sublabel_macro(action_bind_sublabel_suspend_screensaver_enable, MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE) @@ -289,6 +290,7 @@ default_sublabel_macro(action_bind_sublabel_menu_wallpaper_opacity, default_sublabel_macro(action_bind_sublabel_menu_framebuffer_opacity, MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY) default_sublabel_macro(action_bind_sublabel_menu_ribbon_enable, MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE) default_sublabel_macro(action_bind_sublabel_menu_font, MENU_ENUM_SUBLABEL_XMB_FONT) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_take_screenshot, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -591,6 +593,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_GOTO_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_goto_favorites); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_take_screenshot); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; @@ -1264,6 +1269,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_MENU_VIEWS_SETTINGS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_views_settings_list); break; + case MENU_ENUM_LABEL_QUICK_MENU_VIEWS_SETTINGS: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_views_settings_list); + break; case MENU_ENUM_LABEL_MENU_SETTINGS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_settings_list); break; diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index ca99070a11..7cb532788e 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -118,6 +118,7 @@ default_title_macro(action_get_onscreen_display_settings_list, MENU_ENUM_LABEL_ default_title_macro(action_get_onscreen_notifications_settings_list, MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_SETTINGS) default_title_macro(action_get_onscreen_overlay_settings_list, MENU_ENUM_LABEL_VALUE_ONSCREEN_OVERLAY_SETTINGS) default_title_macro(action_get_menu_views_settings_list, MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS) +default_title_macro(action_get_quick_menu_views_settings_list, MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS) default_title_macro(action_get_menu_settings_list, MENU_ENUM_LABEL_VALUE_MENU_SETTINGS) default_title_macro(action_get_user_interface_settings_list, MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS) default_title_macro(action_get_menu_file_browser_settings_list, MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS) @@ -378,6 +379,11 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs, BIND_ACTION_GET_TITLE(cbs, action_get_menu_views_settings_list); return 0; } + else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_VIEWS_SETTINGS_LIST))) + { + BIND_ACTION_GET_TITLE(cbs, action_get_quick_menu_views_settings_list); + return 0; + } else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_MENU_SETTINGS_LIST))) { BIND_ACTION_GET_TITLE(cbs, action_get_menu_settings_list); diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 9994f8fbf0..dfb91e1b24 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -2658,6 +2658,8 @@ static void mui_list_insert(void *userdata, || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_MENU_VIEWS_SETTINGS)) || + string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_VIEWS_SETTINGS)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_MENU_SETTINGS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ONSCREEN_OVERLAY_SETTINGS)) diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h index 9e10b118ae..1115ee525a 100644 --- a/menu/menu_cbs.h +++ b/menu/menu_cbs.h @@ -104,6 +104,7 @@ enum ACTION_OK_DL_ONSCREEN_OVERLAY_SETTINGS_LIST, ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST, ACTION_OK_DL_MENU_VIEWS_SETTINGS_LIST, + ACTION_OK_DL_QUICK_MENU_VIEWS_SETTINGS_LIST, ACTION_OK_DL_MENU_SETTINGS_LIST, ACTION_OK_DL_USER_INTERFACE_SETTINGS_LIST, ACTION_OK_DL_MENU_FILE_BROWSER_SETTINGS_LIST, diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 3b0fe4b3ab..ad1886d64c 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2832,11 +2832,14 @@ static int menu_displaylist_parse_load_content_settings( MENU_ENUM_LABEL_CLOSE_CONTENT, MENU_SETTING_ACTION_CLOSE, 0, 0); - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_TAKE_SCREENSHOT), - msg_hash_to_str(MENU_ENUM_LABEL_TAKE_SCREENSHOT), - MENU_ENUM_LABEL_TAKE_SCREENSHOT, - MENU_SETTING_ACTION_SCREENSHOT, 0, 0); + if (settings->bools.quick_menu_show_take_screenshot) + { + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_TAKE_SCREENSHOT), + msg_hash_to_str(MENU_ENUM_LABEL_TAKE_SCREENSHOT), + MENU_ENUM_LABEL_TAKE_SCREENSHOT, + MENU_SETTING_ACTION_SCREENSHOT, 0, 0); + } menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_STATE_SLOT, PARSE_ONLY_INT, true); @@ -5278,6 +5281,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) case DISPLAYLIST_MENU_VIEWS_SETTINGS_LIST: menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_VIEWS_SETTINGS, + PARSE_ACTION, false); + #if defined(HAVE_NETWORKING) && !defined(HAVE_LAKKA) menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER, @@ -5337,6 +5344,16 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_RGUI_SHOW_START_SCREEN, PARSE_ONLY_BOOL, false); + info->need_refresh = true; + info->need_push = true; + break; + case DISPLAYLIST_QUICK_MENU_VIEWS_SETTINGS_LIST: + menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); + + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + PARSE_ONLY_BOOL, false); + info->need_refresh = true; info->need_push = true; break; diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index 630c0c3286..9572d5ebf5 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -127,6 +127,7 @@ enum menu_displaylist_ctl_state DISPLAYLIST_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST, DISPLAYLIST_MENU_FILE_BROWSER_SETTINGS_LIST, DISPLAYLIST_MENU_VIEWS_SETTINGS_LIST, + DISPLAYLIST_QUICK_MENU_VIEWS_SETTINGS_LIST, DISPLAYLIST_MENU_SETTINGS_LIST, DISPLAYLIST_USER_INTERFACE_SETTINGS_LIST, DISPLAYLIST_RETRO_ACHIEVEMENTS_SETTINGS_LIST, diff --git a/menu/menu_setting.c b/menu/menu_setting.c index d970384af1..4dee529c4d 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -2625,6 +2625,14 @@ static bool setting_append_list( &subgroup_info, parent_group); + CONFIG_ACTION( + list, list_info, + MENU_ENUM_LABEL_QUICK_MENU_VIEWS_SETTINGS, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, + &group_info, + &subgroup_info, + parent_group); + CONFIG_ACTION( list, list_info, MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS, @@ -5828,6 +5836,21 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_take_screenshot, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, + quick_menu_show_take_screenshot, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index e2a9cb0be1..9b38f8e7db 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -709,6 +709,7 @@ enum msg_hash_enums MENU_LABEL(TIMEDATE_ENABLE), MENU_LABEL(BATTERY_LEVEL_ENABLE), MENU_LABEL(MATERIALUI_MENU_COLOR_THEME), + MENU_LABEL(QUICK_MENU_SHOW_TAKE_SCREENSHOT), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), @@ -779,6 +780,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_TOGGLE_KEYBOARD, MENU_LABEL(MENU_VIEWS_SETTINGS), + MENU_LABEL(QUICK_MENU_VIEWS_SETTINGS), MENU_LABEL(MENU_SETTINGS), MENU_LABEL(THUMBNAILS_UPDATER_LIST), MENU_LABEL(USER_INTERFACE_SETTINGS), @@ -895,6 +897,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_DEFERRED_ONSCREEN_OVERLAY_SETTINGS_LIST, MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST, MENU_ENUM_LABEL_DEFERRED_MENU_VIEWS_SETTINGS_LIST, + MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_VIEWS_SETTINGS_LIST, MENU_ENUM_LABEL_DEFERRED_MENU_SETTINGS_LIST, MENU_ENUM_LABEL_DEFERRED_USER_INTERFACE_SETTINGS_LIST, MENU_ENUM_LABEL_DEFERRED_MENU_FILE_BROWSER_SETTINGS_LIST, From b402b4a6cdb895fd08dd1e9110010431e9cae797 Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 09:13:00 +0200 Subject: [PATCH 02/13] Implemented setting for showing/hiding the save/load state related options in the Quick Menu. --- config.def.h | 1 + configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 4 +++ intl/msg_hash_cht.h | 4 +++ intl/msg_hash_de.h | 4 +++ intl/msg_hash_eo.h | 4 +++ intl/msg_hash_fr.h | 4 +++ intl/msg_hash_it.h | 4 +++ intl/msg_hash_ja.h | 4 +++ intl/msg_hash_ko.h | 4 +++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 +++ intl/msg_hash_pt_br.h | 6 ++++ intl/msg_hash_pt_pt.h | 4 +++ intl/msg_hash_ru.h | 4 +++ intl/msg_hash_us.h | 4 +++ intl/msg_hash_vn.h | 4 +++ menu/cbs/menu_cbs_sublabel.c | 4 +++ menu/menu_displaylist.c | 64 +++++++++++++++++++++--------------- menu/menu_setting.c | 15 +++++++++ msg_hash.h | 1 + 22 files changed, 120 insertions(+), 27 deletions(-) diff --git a/config.def.h b/config.def.h index d26f86fcfb..fb6239c004 100644 --- a/config.def.h +++ b/config.def.h @@ -237,6 +237,7 @@ static const bool display_keyboard_overlay = false; static bool default_block_config_read = true; static bool quick_menu_show_take_screenshot = true; +static bool quick_menu_show_save_load_state = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index 20546133cd..414409c566 100644 --- a/configuration.c +++ b/configuration.c @@ -1192,6 +1192,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("menu_core_enable", &settings->bools.menu_core_enable, true, true, false); SETTING_BOOL("menu_dynamic_wallpaper_enable", &settings->bools.menu_dynamic_wallpaper_enable, true, false, false); SETTING_BOOL("quick_menu_show_take_screenshot", &settings->bools.quick_menu_show_take_screenshot, true, quick_menu_show_take_screenshot, false); + SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index 226fbc3acf..d83110c8b7 100644 --- a/configuration.h +++ b/configuration.h @@ -139,6 +139,7 @@ typedef struct settings bool menu_xmb_show_add; bool menu_unified_controls; bool quick_menu_show_take_screenshot; + bool quick_menu_show_save_load_state; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 5290359f20..7ec718eca5 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3071,3 +3071,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 4c5a7ad886..e45fbbfd20 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3071,3 +3071,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index df5e75169c..995fa2dbbd 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3065,3 +3065,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 310805cb68..c09ba567bb 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2934,3 +2934,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index c241169fd5..972e0a8673 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3103,3 +3103,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index b505aaefff..e6b2b5341b 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3157,3 +3157,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index e1174d2da8..21f0fe361e 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3073,3 +3073,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 8973cdc0ab..7049266cf5 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3066,3 +3066,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index c265e18154..da72f24300 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1309,3 +1309,5 @@ MSG_HASH(MENU_ENUM_LABEL_RENAME_ENTRY, "rename_entry") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "quick_menu_show_take_screenshot") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "quick_menu_show_save_load_state") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 06595aa29f..90555f160c 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2934,3 +2934,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 0f297b195d..01e372fca0 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4000,3 +4000,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 513940ab9f..6bb5c22298 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3041,3 +3041,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 8c09d29599..b4784866e6 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3124,3 +3124,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index c3d5c0b0cb..36bb78cf0c 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3159,3 +3159,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index d152eb7f7e..30cbe808b3 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3095,3 +3095,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show Take Screenshot") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Show/hide the 'Take Screenshot' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + "Show/hide the options for saving/loading state.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index f674137620..78902f9e30 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -291,6 +291,7 @@ default_sublabel_macro(action_bind_sublabel_menu_framebuffer_opacity, default_sublabel_macro(action_bind_sublabel_menu_ribbon_enable, MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE) default_sublabel_macro(action_bind_sublabel_menu_font, MENU_ENUM_SUBLABEL_XMB_FONT) default_sublabel_macro(action_bind_sublabel_quick_menu_show_take_screenshot, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -596,6 +597,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_take_screenshot); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_save_load_state); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index ad1886d64c..72897c009f 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2841,38 +2841,44 @@ static int menu_displaylist_parse_load_content_settings( MENU_SETTING_ACTION_SCREENSHOT, 0, 0); } - menu_displaylist_parse_settings_enum(menu, info, - MENU_ENUM_LABEL_STATE_SLOT, PARSE_ONLY_INT, true); + if (settings->bools.quick_menu_show_save_load_state) + { + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_STATE_SLOT, PARSE_ONLY_INT, true); - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_STATE), - msg_hash_to_str(MENU_ENUM_LABEL_SAVE_STATE), - MENU_ENUM_LABEL_SAVE_STATE, - MENU_SETTING_ACTION_SAVESTATE, 0, 0); + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_STATE), + msg_hash_to_str(MENU_ENUM_LABEL_SAVE_STATE), + MENU_ENUM_LABEL_SAVE_STATE, + MENU_SETTING_ACTION_SAVESTATE, 0, 0); - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_STATE), - msg_hash_to_str(MENU_ENUM_LABEL_LOAD_STATE), - MENU_ENUM_LABEL_LOAD_STATE, - MENU_SETTING_ACTION_LOADSTATE, 0, 0); + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_STATE), + msg_hash_to_str(MENU_ENUM_LABEL_LOAD_STATE), + MENU_ENUM_LABEL_LOAD_STATE, + MENU_SETTING_ACTION_LOADSTATE, 0, 0); + } + + if (settings->bools.quick_menu_show_save_load_state) + { +#ifdef HAVE_LAKKA + if (show_advanced_settings) +#endif + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNDO_LOAD_STATE), + msg_hash_to_str(MENU_ENUM_LABEL_UNDO_LOAD_STATE), + MENU_ENUM_LABEL_UNDO_LOAD_STATE, + MENU_SETTING_ACTION_LOADSTATE, 0, 0); #ifdef HAVE_LAKKA - if (show_advanced_settings) + if (show_advanced_settings) #endif - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNDO_LOAD_STATE), - msg_hash_to_str(MENU_ENUM_LABEL_UNDO_LOAD_STATE), - MENU_ENUM_LABEL_UNDO_LOAD_STATE, - MENU_SETTING_ACTION_LOADSTATE, 0, 0); - -#ifdef HAVE_LAKKA - if (show_advanced_settings) -#endif - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNDO_SAVE_STATE), - msg_hash_to_str(MENU_ENUM_LABEL_UNDO_SAVE_STATE), - MENU_ENUM_LABEL_UNDO_SAVE_STATE, - MENU_SETTING_ACTION_LOADSTATE, 0, 0); + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNDO_SAVE_STATE), + msg_hash_to_str(MENU_ENUM_LABEL_UNDO_SAVE_STATE), + MENU_ENUM_LABEL_UNDO_SAVE_STATE, + MENU_SETTING_ACTION_LOADSTATE, 0, 0); + } menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_TO_FAVORITES), @@ -5354,6 +5360,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + PARSE_ONLY_BOOL, false); + info->need_refresh = true; info->need_push = true; break; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 4dee529c4d..a580d7acc1 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5851,6 +5851,21 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_save_load_state, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, + quick_menu_show_save_load_state, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index 9b38f8e7db..c897294b56 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -710,6 +710,7 @@ enum msg_hash_enums MENU_LABEL(BATTERY_LEVEL_ENABLE), MENU_LABEL(MATERIALUI_MENU_COLOR_THEME), MENU_LABEL(QUICK_MENU_SHOW_TAKE_SCREENSHOT), + MENU_LABEL(QUICK_MENU_SHOW_SAVE_LOAD_STATE), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), From db0e0f443a69f6bcc51c6acae3a0b6024433310b Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 09:30:53 +0200 Subject: [PATCH 03/13] Implemented setting for showing/hiding the options for undoing save/load state in the Quick Menu. --- config.def.h | 1 + configuration.c | 5 +++-- configuration.h | 1 + intl/msg_hash_chs.h | 4 ++++ intl/msg_hash_cht.h | 4 ++++ intl/msg_hash_de.h | 4 ++++ intl/msg_hash_eo.h | 4 ++++ intl/msg_hash_fr.h | 4 ++++ intl/msg_hash_it.h | 4 ++++ intl/msg_hash_ja.h | 4 ++++ intl/msg_hash_ko.h | 4 ++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 ++++ intl/msg_hash_pt_br.h | 6 ++++++ intl/msg_hash_pt_pt.h | 4 ++++ intl/msg_hash_ru.h | 4 ++++ intl/msg_hash_us.h | 4 ++++ intl/msg_hash_vn.h | 4 ++++ menu/cbs/menu_cbs_sublabel.c | 8 ++++++-- menu/menu_displaylist.c | 7 ++++++- menu/menu_setting.c | 15 +++++++++++++++ msg_hash.h | 1 + 22 files changed, 93 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index fb6239c004..474cdf0033 100644 --- a/config.def.h +++ b/config.def.h @@ -238,6 +238,7 @@ static bool default_block_config_read = true; static bool quick_menu_show_take_screenshot = true; static bool quick_menu_show_save_load_state = true; +static bool quick_menu_show_undo_save_load_state = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index 414409c566..5ab9dbce73 100644 --- a/configuration.c +++ b/configuration.c @@ -1191,8 +1191,9 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("menu_battery_level_enable", &settings->bools.menu_battery_level_enable, true, true, false); SETTING_BOOL("menu_core_enable", &settings->bools.menu_core_enable, true, true, false); SETTING_BOOL("menu_dynamic_wallpaper_enable", &settings->bools.menu_dynamic_wallpaper_enable, true, false, false); - SETTING_BOOL("quick_menu_show_take_screenshot", &settings->bools.quick_menu_show_take_screenshot, true, quick_menu_show_take_screenshot, false); - SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false); + SETTING_BOOL("quick_menu_show_take_screenshot", &settings->bools.quick_menu_show_take_screenshot, true, quick_menu_show_take_screenshot, false); + SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false); + SETTING_BOOL("quick_menu_show_undo_save_load_state", &settings->bools.quick_menu_show_undo_save_load_state, true, quick_menu_show_undo_save_load_state, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index d83110c8b7..edd6e4af42 100644 --- a/configuration.h +++ b/configuration.h @@ -140,6 +140,7 @@ typedef struct settings bool menu_unified_controls; bool quick_menu_show_take_screenshot; bool quick_menu_show_save_load_state; + bool quick_menu_show_undo_save_load_state; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 7ec718eca5..298ad0ed34 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3075,3 +3075,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index e45fbbfd20..bcc865e981 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3075,3 +3075,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 995fa2dbbd..2ac0f4d318 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3069,3 +3069,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index c09ba567bb..afc65f2c66 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2938,3 +2938,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 972e0a8673..7f8208a3a2 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3107,3 +3107,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index e6b2b5341b..6e18bdd6d1 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3161,3 +3161,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 21f0fe361e..f03656bd1c 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3077,3 +3077,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 7049266cf5..a0b5466df1 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3070,3 +3070,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index da72f24300..1484c2d0cf 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1311,3 +1311,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "quick_menu_show_take_screenshot") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "quick_menu_show_save_load_state") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "quick_menu_show_undo_save_load_state") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 90555f160c..5d7160b7fe 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2938,3 +2938,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 01e372fca0..d9efcce271 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4006,3 +4006,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 6bb5c22298..0a0858b5ad 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3045,3 +3045,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index b4784866e6..121d08c951 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3128,3 +3128,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 36bb78cf0c..7532d96554 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3163,3 +3163,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 30cbe808b3..384fb84b0c 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3099,3 +3099,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "Show/hide the options for saving/loading state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show Undo Save/Load State") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + "Show/hide the options for undoing save/load state.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 78902f9e30..d6cbe79f5d 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -287,15 +287,16 @@ default_sublabel_macro(action_bind_sublabel_xmb_icon_theme, default_sublabel_macro(action_bind_sublabel_xmb_shadows_enable, MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE) default_sublabel_macro(action_bind_sublabel_menu_color_theme, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME) default_sublabel_macro(action_bind_sublabel_menu_wallpaper_opacity, MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY) -default_sublabel_macro(action_bind_sublabel_menu_framebuffer_opacity, MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY) +default_sublabel_macro(action_bind_sublabel_menu_framebuffer_opacity, MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY) default_sublabel_macro(action_bind_sublabel_menu_ribbon_enable, MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE) default_sublabel_macro(action_bind_sublabel_menu_font, MENU_ENUM_SUBLABEL_XMB_FONT) default_sublabel_macro(action_bind_sublabel_quick_menu_show_take_screenshot, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT) default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_undo_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) -default_sublabel_macro(action_bind_sublabel_menu_show_core_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER) +default_sublabel_macro(action_bind_sublabel_menu_show_core_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER) default_sublabel_macro(action_bind_sublabel_menu_music_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_MUSIC) default_sublabel_macro(action_bind_sublabel_menu_video_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_VIDEO) default_sublabel_macro(action_bind_sublabel_menu_netplay_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_NETPLAY) @@ -600,6 +601,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_save_load_state); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_undo_save_load_state); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 72897c009f..ef1f9f9c9e 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2859,7 +2859,8 @@ static int menu_displaylist_parse_load_content_settings( MENU_SETTING_ACTION_LOADSTATE, 0, 0); } - if (settings->bools.quick_menu_show_save_load_state) + if (settings->bools.quick_menu_show_save_load_state && + settings->bools.quick_menu_show_undo_save_load_state) { #ifdef HAVE_LAKKA if (show_advanced_settings) @@ -5364,6 +5365,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + PARSE_ONLY_BOOL, false); + info->need_refresh = true; info->need_push = true; break; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index a580d7acc1..ac5adabcfc 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5866,6 +5866,21 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_undo_save_load_state, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, + quick_menu_show_undo_save_load_state, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_LAKKA_ADVANCED); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index c897294b56..fbdb3db098 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -711,6 +711,7 @@ enum msg_hash_enums MENU_LABEL(MATERIALUI_MENU_COLOR_THEME), MENU_LABEL(QUICK_MENU_SHOW_TAKE_SCREENSHOT), MENU_LABEL(QUICK_MENU_SHOW_SAVE_LOAD_STATE), + MENU_LABEL(QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), From 9356c326e0edd5765710ae5408dad2474159f83d Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 09:46:42 +0200 Subject: [PATCH 04/13] Implemented setting for showing/hiding the "Add to Favorites" option in the Quick Menu. --- config.def.h | 5 +++-- configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 4 ++++ intl/msg_hash_cht.h | 4 ++++ intl/msg_hash_de.h | 4 ++++ intl/msg_hash_eo.h | 4 ++++ intl/msg_hash_fr.h | 4 ++++ intl/msg_hash_it.h | 4 ++++ intl/msg_hash_ja.h | 4 ++++ intl/msg_hash_ko.h | 4 ++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 ++++ intl/msg_hash_pt_br.h | 6 ++++++ intl/msg_hash_pt_pt.h | 4 ++++ intl/msg_hash_ru.h | 4 ++++ intl/msg_hash_us.h | 4 ++++ intl/msg_hash_vn.h | 4 ++++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ menu/menu_displaylist.c | 15 +++++++++++---- menu/menu_setting.c | 15 +++++++++++++++ msg_hash.h | 1 + 22 files changed, 96 insertions(+), 6 deletions(-) diff --git a/config.def.h b/config.def.h index 474cdf0033..b6f31dcd64 100644 --- a/config.def.h +++ b/config.def.h @@ -236,9 +236,10 @@ static const bool display_keyboard_overlay = false; static bool default_block_config_read = true; -static bool quick_menu_show_take_screenshot = true; -static bool quick_menu_show_save_load_state = true; +static bool quick_menu_show_take_screenshot = true; +static bool quick_menu_show_save_load_state = true; static bool quick_menu_show_undo_save_load_state = true; +static bool quick_menu_show_add_to_favorites = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index 5ab9dbce73..652e995857 100644 --- a/configuration.c +++ b/configuration.c @@ -1194,6 +1194,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("quick_menu_show_take_screenshot", &settings->bools.quick_menu_show_take_screenshot, true, quick_menu_show_take_screenshot, false); SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false); SETTING_BOOL("quick_menu_show_undo_save_load_state", &settings->bools.quick_menu_show_undo_save_load_state, true, quick_menu_show_undo_save_load_state, false); + SETTING_BOOL("quick_menu_show_add_to_favorites", &settings->bools.quick_menu_show_add_to_favorites, true, quick_menu_show_add_to_favorites, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index edd6e4af42..a996a044bb 100644 --- a/configuration.h +++ b/configuration.h @@ -141,6 +141,7 @@ typedef struct settings bool quick_menu_show_take_screenshot; bool quick_menu_show_save_load_state; bool quick_menu_show_undo_save_load_state; + bool quick_menu_show_add_to_favorites; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 298ad0ed34..78899f7aae 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3079,3 +3079,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index bcc865e981..5c22c75bf8 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3079,3 +3079,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 2ac0f4d318..2cb79aaceb 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3073,3 +3073,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index afc65f2c66..417981a366 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2942,3 +2942,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 7f8208a3a2..5fe8a0e158 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3111,3 +3111,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 6e18bdd6d1..b6aef110cd 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3165,3 +3165,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index f03656bd1c..a12816d092 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3081,3 +3081,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index a0b5466df1..d681766d99 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3074,3 +3074,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 1484c2d0cf..070da7fb14 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1313,3 +1313,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, "quick_menu_show_save_load_state") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "quick_menu_show_undo_save_load_state") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "quick_menu_show_add_to_favorites") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 5d7160b7fe..209983c573 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2942,3 +2942,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index d9efcce271..64982eaf55 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4012,3 +4012,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 0a0858b5ad..4e4a2a52f4 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3049,3 +3049,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 121d08c951..534e1f6056 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3132,3 +3132,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 7532d96554..ecfac9ff66 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3167,3 +3167,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 384fb84b0c..b89f864a96 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3103,3 +3103,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show Undo Save/Load State") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "Show/hide the options for undoing save/load state.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show Add to Favorites") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Show/hide the 'Add to Favorites' option.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index d6cbe79f5d..e15a2b9b9e 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -293,6 +293,7 @@ default_sublabel_macro(action_bind_sublabel_menu_font, default_sublabel_macro(action_bind_sublabel_quick_menu_show_take_screenshot, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT) default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE) default_sublabel_macro(action_bind_sublabel_quick_menu_show_undo_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_add_to_favorites, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -604,6 +605,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_undo_save_load_state); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_add_to_favorites); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index ef1f9f9c9e..4bca531532 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2881,10 +2881,13 @@ static int menu_displaylist_parse_load_content_settings( MENU_SETTING_ACTION_LOADSTATE, 0, 0); } - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_TO_FAVORITES), - msg_hash_to_str(MENU_ENUM_LABEL_ADD_TO_FAVORITES), - MENU_ENUM_LABEL_ADD_TO_FAVORITES, FILE_TYPE_PLAYLIST_ENTRY, 0, 0); + if (settings->bools.quick_menu_show_add_to_favorites) + { + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_TO_FAVORITES), + msg_hash_to_str(MENU_ENUM_LABEL_ADD_TO_FAVORITES), + MENU_ENUM_LABEL_ADD_TO_FAVORITES, FILE_TYPE_PLAYLIST_ENTRY, 0, 0); + } menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_OPTIONS), @@ -5369,6 +5372,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + PARSE_ONLY_BOOL, false); + info->need_refresh = true; info->need_push = true; break; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index ac5adabcfc..eb9e0ded92 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5881,6 +5881,21 @@ static bool setting_append_list( general_read_handler, SD_FLAG_LAKKA_ADVANCED); + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_add_to_favorites, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + quick_menu_show_add_to_favorites, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index fbdb3db098..50e5680f5b 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -712,6 +712,7 @@ enum msg_hash_enums MENU_LABEL(QUICK_MENU_SHOW_TAKE_SCREENSHOT), MENU_LABEL(QUICK_MENU_SHOW_SAVE_LOAD_STATE), MENU_LABEL(QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE), + MENU_LABEL(QUICK_MENU_SHOW_ADD_TO_FAVORITES), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), From d25916cacf2114ddbe0a864d589bca3793aa3148 Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 09:56:27 +0200 Subject: [PATCH 05/13] Implemented setting for showing/hiding the "Options" option in the Quick Menu. --- config.def.h | 1 + configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 4 ++++ intl/msg_hash_cht.h | 4 ++++ intl/msg_hash_de.h | 4 ++++ intl/msg_hash_eo.h | 4 ++++ intl/msg_hash_fr.h | 4 ++++ intl/msg_hash_it.h | 4 ++++ intl/msg_hash_ja.h | 4 ++++ intl/msg_hash_ko.h | 4 ++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 ++++ intl/msg_hash_pt_br.h | 6 ++++++ intl/msg_hash_pt_pt.h | 4 ++++ intl/msg_hash_ru.h | 4 ++++ intl/msg_hash_us.h | 4 ++++ intl/msg_hash_vn.h | 4 ++++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ menu/menu_displaylist.c | 17 ++++++++++++----- menu/menu_setting.c | 15 +++++++++++++++ msg_hash.h | 1 + 22 files changed, 95 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index b6f31dcd64..3c615e4dcb 100644 --- a/config.def.h +++ b/config.def.h @@ -240,6 +240,7 @@ static bool quick_menu_show_take_screenshot = true; static bool quick_menu_show_save_load_state = true; static bool quick_menu_show_undo_save_load_state = true; static bool quick_menu_show_add_to_favorites = true; +static bool quick_menu_show_options = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index 652e995857..bb674f90ad 100644 --- a/configuration.c +++ b/configuration.c @@ -1195,6 +1195,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("quick_menu_show_save_load_state", &settings->bools.quick_menu_show_save_load_state, true, quick_menu_show_save_load_state, false); SETTING_BOOL("quick_menu_show_undo_save_load_state", &settings->bools.quick_menu_show_undo_save_load_state, true, quick_menu_show_undo_save_load_state, false); SETTING_BOOL("quick_menu_show_add_to_favorites", &settings->bools.quick_menu_show_add_to_favorites, true, quick_menu_show_add_to_favorites, false); + SETTING_BOOL("quick_menu_show_options", &settings->bools.quick_menu_show_options, true, quick_menu_show_options, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index a996a044bb..2ec99549ce 100644 --- a/configuration.h +++ b/configuration.h @@ -142,6 +142,7 @@ typedef struct settings bool quick_menu_show_save_load_state; bool quick_menu_show_undo_save_load_state; bool quick_menu_show_add_to_favorites; + bool quick_menu_show_options; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 78899f7aae..deb4db8f85 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3083,3 +3083,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 5c22c75bf8..5f7dcc9f33 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3083,3 +3083,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 2cb79aaceb..d1a6b80e4a 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3077,3 +3077,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 417981a366..a6a950ec48 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2946,3 +2946,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 5fe8a0e158..8307488da7 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3115,3 +3115,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index b6aef110cd..0b516746d0 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3169,3 +3169,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index a12816d092..91ec55780f 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3085,3 +3085,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index d681766d99..8bb6ecd6db 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3078,3 +3078,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 070da7fb14..ebeee2e561 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1315,3 +1315,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, "quick_menu_show_undo_save_load_state") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "quick_menu_show_add_to_favorites") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS, + "quick_menu_show_options") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 209983c573..461bb804f0 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2946,3 +2946,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 64982eaf55..b281453859 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4018,3 +4018,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 4e4a2a52f4..cc37eca0ae 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3053,3 +3053,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 534e1f6056..f760f9ff82 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3136,3 +3136,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index ecfac9ff66..6527129a2b 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3171,3 +3171,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index b89f864a96..a6b834e789 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3107,3 +3107,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show Add to Favorites") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "Show/hide the 'Add to Favorites' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "Show Options") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, + "Show/hide the 'Options' option.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index e15a2b9b9e..6dc66ccb13 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -294,6 +294,7 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_take_screenshot, default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE) default_sublabel_macro(action_bind_sublabel_quick_menu_show_undo_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE) default_sublabel_macro(action_bind_sublabel_quick_menu_show_add_to_favorites, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_options, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -608,6 +609,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_add_to_favorites); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_options); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 4bca531532..3e8181a057 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2889,11 +2889,14 @@ static int menu_displaylist_parse_load_content_settings( MENU_ENUM_LABEL_ADD_TO_FAVORITES, FILE_TYPE_PLAYLIST_ENTRY, 0, 0); } - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_OPTIONS), - msg_hash_to_str(MENU_ENUM_LABEL_CORE_OPTIONS), - MENU_ENUM_LABEL_CORE_OPTIONS, - MENU_SETTING_ACTION, 0, 0); + if (settings->bools.quick_menu_show_options) + { + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_OPTIONS), + msg_hash_to_str(MENU_ENUM_LABEL_CORE_OPTIONS), + MENU_ENUM_LABEL_CORE_OPTIONS, + MENU_SETTING_ACTION, 0, 0); + } #if 0 menu_entries_append_enum(info->list, @@ -5376,6 +5379,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS, + PARSE_ONLY_BOOL, false); + info->need_refresh = true; info->need_push = true; break; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index eb9e0ded92..ae42a40464 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5896,6 +5896,21 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_options, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + quick_menu_show_options, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index 50e5680f5b..48a2716d4b 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -713,6 +713,7 @@ enum msg_hash_enums MENU_LABEL(QUICK_MENU_SHOW_SAVE_LOAD_STATE), MENU_LABEL(QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE), MENU_LABEL(QUICK_MENU_SHOW_ADD_TO_FAVORITES), + MENU_LABEL(QUICK_MENU_SHOW_OPTIONS), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), From d5a802e4a8ca24607567bc768073513655d444ed Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 10:05:32 +0200 Subject: [PATCH 06/13] Implemented setting for showing/hiding the "Controls" option in the Quick Menu. --- config.def.h | 1 + configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 4 ++++ intl/msg_hash_cht.h | 4 ++++ intl/msg_hash_de.h | 4 ++++ intl/msg_hash_eo.h | 4 ++++ intl/msg_hash_fr.h | 4 ++++ intl/msg_hash_it.h | 4 ++++ intl/msg_hash_ja.h | 4 ++++ intl/msg_hash_ko.h | 4 ++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 ++++ intl/msg_hash_pt_br.h | 6 ++++++ intl/msg_hash_pt_pt.h | 4 ++++ intl/msg_hash_ru.h | 4 ++++ intl/msg_hash_us.h | 4 ++++ intl/msg_hash_vn.h | 4 ++++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ menu/menu_displaylist.c | 17 ++++++++++++----- menu/menu_setting.c | 15 +++++++++++++++ msg_hash.h | 1 + 22 files changed, 95 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index 3c615e4dcb..37781ac9cf 100644 --- a/config.def.h +++ b/config.def.h @@ -241,6 +241,7 @@ static bool quick_menu_show_save_load_state = true; static bool quick_menu_show_undo_save_load_state = true; static bool quick_menu_show_add_to_favorites = true; static bool quick_menu_show_options = true; +static bool quick_menu_show_controls = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index bb674f90ad..4e217f7316 100644 --- a/configuration.c +++ b/configuration.c @@ -1196,6 +1196,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("quick_menu_show_undo_save_load_state", &settings->bools.quick_menu_show_undo_save_load_state, true, quick_menu_show_undo_save_load_state, false); SETTING_BOOL("quick_menu_show_add_to_favorites", &settings->bools.quick_menu_show_add_to_favorites, true, quick_menu_show_add_to_favorites, false); SETTING_BOOL("quick_menu_show_options", &settings->bools.quick_menu_show_options, true, quick_menu_show_options, false); + SETTING_BOOL("quick_menu_show_controls", &settings->bools.quick_menu_show_controls, true, quick_menu_show_controls, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index 2ec99549ce..509852d4e9 100644 --- a/configuration.h +++ b/configuration.h @@ -143,6 +143,7 @@ typedef struct settings bool quick_menu_show_undo_save_load_state; bool quick_menu_show_add_to_favorites; bool quick_menu_show_options; + bool quick_menu_show_controls; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index deb4db8f85..5a218d0b1b 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3087,3 +3087,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 5f7dcc9f33..3f5018d22f 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3087,3 +3087,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index d1a6b80e4a..a501382257 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3081,3 +3081,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index a6a950ec48..e05835f9f1 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2950,3 +2950,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 8307488da7..a081fb9a38 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3119,3 +3119,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 0b516746d0..b7204f5364 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3173,3 +3173,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 91ec55780f..5ec31e7ac6 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3089,3 +3089,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 8bb6ecd6db..9d592088a4 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3082,3 +3082,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index ebeee2e561..e9fd7f3b72 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1317,3 +1317,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, "quick_menu_show_add_to_favorites") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS, "quick_menu_show_options") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS, + "quick_menu_show_controls") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 461bb804f0..a2f9a61682 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2950,3 +2950,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index b281453859..3d0a52ca89 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4024,3 +4024,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index cc37eca0ae..2c2c6d62db 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3057,3 +3057,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index f760f9ff82..c38d69fb35 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3140,3 +3140,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 6527129a2b..b508bb56aa 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3175,3 +3175,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index a6b834e789..babd1ef86c 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3111,3 +3111,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, "Show Options") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Show/hide the 'Options' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "Show Controls") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, + "Show/hide the 'Controls' option.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 6dc66ccb13..18f8b24a9d 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -295,6 +295,7 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_load_state, default_sublabel_macro(action_bind_sublabel_quick_menu_show_undo_save_load_state, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE) default_sublabel_macro(action_bind_sublabel_quick_menu_show_add_to_favorites, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES) default_sublabel_macro(action_bind_sublabel_quick_menu_show_options, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_controls, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -612,6 +613,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_options); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_controls); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 3e8181a057..6dac452020 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2906,11 +2906,14 @@ static int menu_displaylist_parse_load_content_settings( MENU_SETTING_ACTION, 0, 0); #endif - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_INPUT_REMAPPING_OPTIONS), - msg_hash_to_str(MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS), - MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS, - MENU_SETTING_ACTION, 0, 0); + if (settings->bools.quick_menu_show_controls) + { + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_INPUT_REMAPPING_OPTIONS), + msg_hash_to_str(MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS), + MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS, + MENU_SETTING_ACTION, 0, 0); + } #ifdef HAVE_LAKKA if (show_advanced_settings) @@ -5383,6 +5386,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS, + PARSE_ONLY_BOOL, false); + info->need_refresh = true; info->need_push = true; break; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index ae42a40464..972767b70d 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5911,6 +5911,21 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_controls, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + quick_menu_show_controls, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index 48a2716d4b..ff4412d48c 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -714,6 +714,7 @@ enum msg_hash_enums MENU_LABEL(QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE), MENU_LABEL(QUICK_MENU_SHOW_ADD_TO_FAVORITES), MENU_LABEL(QUICK_MENU_SHOW_OPTIONS), + MENU_LABEL(QUICK_MENU_SHOW_CONTROLS), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), From a64683ba3406145b31590892ce09fb90678e78f8 Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 10:17:15 +0200 Subject: [PATCH 07/13] Implemented setting for showing/hiding the "Cheats" option in the Quick Menu. --- config.def.h | 1 + configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 4 ++++ intl/msg_hash_cht.h | 4 ++++ intl/msg_hash_de.h | 4 ++++ intl/msg_hash_eo.h | 4 ++++ intl/msg_hash_fr.h | 4 ++++ intl/msg_hash_it.h | 4 ++++ intl/msg_hash_ja.h | 4 ++++ intl/msg_hash_ko.h | 4 ++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 ++++ intl/msg_hash_pt_br.h | 6 ++++++ intl/msg_hash_pt_pt.h | 4 ++++ intl/msg_hash_ru.h | 4 ++++ intl/msg_hash_us.h | 4 ++++ intl/msg_hash_vn.h | 4 ++++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ menu/menu_displaylist.c | 21 +++++++++++++++------ menu/menu_setting.c | 15 +++++++++++++++ msg_hash.h | 1 + 22 files changed, 98 insertions(+), 6 deletions(-) diff --git a/config.def.h b/config.def.h index 37781ac9cf..aa8b126937 100644 --- a/config.def.h +++ b/config.def.h @@ -242,6 +242,7 @@ static bool quick_menu_show_undo_save_load_state = true; static bool quick_menu_show_add_to_favorites = true; static bool quick_menu_show_options = true; static bool quick_menu_show_controls = true; +static bool quick_menu_show_cheats = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index 4e217f7316..bcc10275ef 100644 --- a/configuration.c +++ b/configuration.c @@ -1197,6 +1197,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("quick_menu_show_add_to_favorites", &settings->bools.quick_menu_show_add_to_favorites, true, quick_menu_show_add_to_favorites, false); SETTING_BOOL("quick_menu_show_options", &settings->bools.quick_menu_show_options, true, quick_menu_show_options, false); SETTING_BOOL("quick_menu_show_controls", &settings->bools.quick_menu_show_controls, true, quick_menu_show_controls, false); + SETTING_BOOL("quick_menu_show_cheats", &settings->bools.quick_menu_show_cheats, true, quick_menu_show_cheats, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index 509852d4e9..caa71a4a0c 100644 --- a/configuration.h +++ b/configuration.h @@ -144,6 +144,7 @@ typedef struct settings bool quick_menu_show_add_to_favorites; bool quick_menu_show_options; bool quick_menu_show_controls; + bool quick_menu_show_cheats; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 5a218d0b1b..585a75b677 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3091,3 +3091,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 3f5018d22f..a34364c2bb 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3091,3 +3091,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index a501382257..7597cdfaf9 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3085,3 +3085,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index e05835f9f1..f4dff1dcf5 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2954,3 +2954,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index a081fb9a38..f2bafa0b80 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3123,3 +3123,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index b7204f5364..b2a28dcfd5 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3177,3 +3177,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 5ec31e7ac6..2036449811 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3093,3 +3093,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 9d592088a4..320a01d2e1 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3086,3 +3086,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index e9fd7f3b72..5ffe91b4ce 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1319,3 +1319,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS, "quick_menu_show_options") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS, "quick_menu_show_controls") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS, + "quick_menu_show_cheats") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index a2f9a61682..5d94f43416 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2954,3 +2954,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 3d0a52ca89..7f3168541a 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4030,3 +4030,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 2c2c6d62db..2ccfb9a83e 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3061,3 +3061,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index c38d69fb35..6dbb12b19a 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3144,3 +3144,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index b508bb56aa..f0620b1420 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3179,3 +3179,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index babd1ef86c..9a5286fa45 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3115,3 +3115,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, "Show Controls") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, "Show/hide the 'Controls' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "Show Cheats") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, + "Show/hide the 'Cheats' option.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 18f8b24a9d..eb8f44e005 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -296,6 +296,7 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_undo_save_load_state default_sublabel_macro(action_bind_sublabel_quick_menu_show_add_to_favorites, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES) default_sublabel_macro(action_bind_sublabel_quick_menu_show_options, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS) default_sublabel_macro(action_bind_sublabel_quick_menu_show_controls, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_cheats, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -616,6 +617,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_controls); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_cheats); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 6dac452020..e39f0c99a8 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2918,18 +2918,23 @@ static int menu_displaylist_parse_load_content_settings( #ifdef HAVE_LAKKA if (show_advanced_settings) #endif - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_CHEAT_OPTIONS), - msg_hash_to_str(MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS), - MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS, - MENU_SETTING_ACTION, 0, 0); - if ( (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) + if (settings->bools.quick_menu_show_cheats) + { + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_CHEAT_OPTIONS), + msg_hash_to_str(MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS), + MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS, + MENU_SETTING_ACTION, 0, 0); + } + + if ((!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) && system->disk_control_cb.get_num_images) menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS), msg_hash_to_str(MENU_ENUM_LABEL_DISK_OPTIONS), MENU_ENUM_LABEL_DISK_OPTIONS, MENU_SETTING_ACTION_CORE_DISK_OPTIONS, 0, 0); + #ifdef HAVE_SHADER_MANAGER menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SHADER_OPTIONS), @@ -5390,6 +5395,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS, + PARSE_ONLY_BOOL, false); + info->need_refresh = true; info->need_push = true; break; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 972767b70d..0777c8c368 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5926,6 +5926,21 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_cheats, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + quick_menu_show_cheats, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_LAKKA_ADVANCED); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index ff4412d48c..ed12fa4680 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -715,6 +715,7 @@ enum msg_hash_enums MENU_LABEL(QUICK_MENU_SHOW_ADD_TO_FAVORITES), MENU_LABEL(QUICK_MENU_SHOW_OPTIONS), MENU_LABEL(QUICK_MENU_SHOW_CONTROLS), + MENU_LABEL(QUICK_MENU_SHOW_CHEATS), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), From b7654dac7e75a51f5fd88babf0afe0a8bea8d8ad Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 10:30:25 +0200 Subject: [PATCH 08/13] Implemented setting for showing/hiding the "Shaders" option in the Quick Menu. --- config.def.h | 1 + configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 4 ++++ intl/msg_hash_cht.h | 4 ++++ intl/msg_hash_de.h | 4 ++++ intl/msg_hash_eo.h | 4 ++++ intl/msg_hash_fr.h | 4 ++++ intl/msg_hash_it.h | 4 ++++ intl/msg_hash_ja.h | 4 ++++ intl/msg_hash_ko.h | 4 ++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 ++++ intl/msg_hash_pt_br.h | 6 ++++++ intl/msg_hash_pt_pt.h | 4 ++++ intl/msg_hash_ru.h | 4 ++++ intl/msg_hash_us.h | 4 ++++ intl/msg_hash_vn.h | 4 ++++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ menu/menu_displaylist.c | 18 +++++++++++++----- menu/menu_setting.c | 17 +++++++++++++++++ msg_hash.h | 1 + 22 files changed, 98 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index aa8b126937..b46cc3b9bc 100644 --- a/config.def.h +++ b/config.def.h @@ -243,6 +243,7 @@ static bool quick_menu_show_add_to_favorites = true; static bool quick_menu_show_options = true; static bool quick_menu_show_controls = true; static bool quick_menu_show_cheats = true; +static bool quick_menu_show_shaders = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index bcc10275ef..70e90dc143 100644 --- a/configuration.c +++ b/configuration.c @@ -1198,6 +1198,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("quick_menu_show_options", &settings->bools.quick_menu_show_options, true, quick_menu_show_options, false); SETTING_BOOL("quick_menu_show_controls", &settings->bools.quick_menu_show_controls, true, quick_menu_show_controls, false); SETTING_BOOL("quick_menu_show_cheats", &settings->bools.quick_menu_show_cheats, true, quick_menu_show_cheats, false); + SETTING_BOOL("quick_menu_show_shaders", &settings->bools.quick_menu_show_shaders, true, quick_menu_show_shaders, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index caa71a4a0c..733fea6912 100644 --- a/configuration.h +++ b/configuration.h @@ -145,6 +145,7 @@ typedef struct settings bool quick_menu_show_options; bool quick_menu_show_controls; bool quick_menu_show_cheats; + bool quick_menu_show_shaders; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 585a75b677..64731bce7b 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3095,3 +3095,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index a34364c2bb..ab74e64961 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3095,3 +3095,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 7597cdfaf9..4a98160856 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3089,3 +3089,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index f4dff1dcf5..8b4786a641 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2958,3 +2958,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index f2bafa0b80..4a0e7876d4 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3127,3 +3127,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index b2a28dcfd5..182180d98a 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3181,3 +3181,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 2036449811..c806e4c6ee 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3097,3 +3097,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 320a01d2e1..bea2016f20 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3090,3 +3090,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 5ffe91b4ce..83352e9fe8 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1321,3 +1321,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS, "quick_menu_show_controls") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS, "quick_menu_show_cheats") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SHADERS, + "quick_menu_show_shaders") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 5d94f43416..9196317a3e 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2958,3 +2958,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 7f3168541a..165d3949fc 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4036,3 +4036,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 2ccfb9a83e..06608c6ea3 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3065,3 +3065,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 6dbb12b19a..c9481f6599 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3148,3 +3148,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index f0620b1420..32ab61d581 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3183,3 +3183,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 9a5286fa45..38e275b317 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3119,3 +3119,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, "Show Cheats") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, "Show/hide the 'Cheats' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + "Show Shaders") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, + "Show/hide the 'Shaders' option.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index eb8f44e005..1be70b0476 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -297,6 +297,7 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_add_to_favorites, default_sublabel_macro(action_bind_sublabel_quick_menu_show_options, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS) default_sublabel_macro(action_bind_sublabel_quick_menu_show_controls, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS) default_sublabel_macro(action_bind_sublabel_quick_menu_show_cheats, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_shaders, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -620,6 +621,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_cheats); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_SHADERS: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_shaders); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index e39f0c99a8..cbd8ff161b 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2936,11 +2936,14 @@ static int menu_displaylist_parse_load_content_settings( MENU_SETTING_ACTION_CORE_DISK_OPTIONS, 0, 0); #ifdef HAVE_SHADER_MANAGER - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SHADER_OPTIONS), - msg_hash_to_str(MENU_ENUM_LABEL_SHADER_OPTIONS), - MENU_ENUM_LABEL_SHADER_OPTIONS, - MENU_SETTING_ACTION, 0, 0); + if (settings->bools.quick_menu_show_shaders) + { + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SHADER_OPTIONS), + msg_hash_to_str(MENU_ENUM_LABEL_SHADER_OPTIONS), + MENU_ENUM_LABEL_SHADER_OPTIONS, + MENU_SETTING_ACTION, 0, 0); + } #endif #ifdef HAVE_LAKKA @@ -5398,6 +5401,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS, PARSE_ONLY_BOOL, false); +#ifdef HAVE_SHADER_MANAGER + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_SHADERS, + PARSE_ONLY_BOOL, false); +#endif info->need_refresh = true; info->need_push = true; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 0777c8c368..ff1d48c4f5 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5941,6 +5941,23 @@ static bool setting_append_list( general_read_handler, SD_FLAG_LAKKA_ADVANCED); +#ifdef HAVE_SHADER_MANAGER + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_shaders, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_SHADERS, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, + quick_menu_show_shaders, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); +#endif + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index ed12fa4680..ffba51ce63 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -716,6 +716,7 @@ enum msg_hash_enums MENU_LABEL(QUICK_MENU_SHOW_OPTIONS), MENU_LABEL(QUICK_MENU_SHOW_CONTROLS), MENU_LABEL(QUICK_MENU_SHOW_CHEATS), + MENU_LABEL(QUICK_MENU_SHOW_SHADERS), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), From 3f1dd895da7927f19f6d90dc262e5413bfd5c383 Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 10:44:37 +0200 Subject: [PATCH 09/13] Implemented setting for showing/hiding the "Save Core Overrides" option in the Quick Menu. --- config.def.h | 1 + configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 4 ++++ intl/msg_hash_cht.h | 4 ++++ intl/msg_hash_de.h | 4 ++++ intl/msg_hash_eo.h | 4 ++++ intl/msg_hash_fr.h | 4 ++++ intl/msg_hash_it.h | 4 ++++ intl/msg_hash_ja.h | 4 ++++ intl/msg_hash_ko.h | 4 ++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 ++++ intl/msg_hash_pt_br.h | 6 ++++++ intl/msg_hash_pt_pt.h | 4 ++++ intl/msg_hash_ru.h | 4 ++++ intl/msg_hash_us.h | 4 ++++ intl/msg_hash_vn.h | 4 ++++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ menu/menu_displaylist.c | 16 +++++++++++----- menu/menu_setting.c | 15 +++++++++++++++ msg_hash.h | 1 + 22 files changed, 94 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index b46cc3b9bc..b12d534205 100644 --- a/config.def.h +++ b/config.def.h @@ -244,6 +244,7 @@ static bool quick_menu_show_options = true; static bool quick_menu_show_controls = true; static bool quick_menu_show_cheats = true; static bool quick_menu_show_shaders = true; +static bool quick_menu_show_save_core_overrides = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index 70e90dc143..99ee97e9a2 100644 --- a/configuration.c +++ b/configuration.c @@ -1199,6 +1199,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("quick_menu_show_controls", &settings->bools.quick_menu_show_controls, true, quick_menu_show_controls, false); SETTING_BOOL("quick_menu_show_cheats", &settings->bools.quick_menu_show_cheats, true, quick_menu_show_cheats, false); SETTING_BOOL("quick_menu_show_shaders", &settings->bools.quick_menu_show_shaders, true, quick_menu_show_shaders, false); + SETTING_BOOL("quick_menu_show_save_core_overrides", &settings->bools.quick_menu_show_save_core_overrides, true, quick_menu_show_save_core_overrides, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index 733fea6912..eac229dc88 100644 --- a/configuration.h +++ b/configuration.h @@ -146,6 +146,7 @@ typedef struct settings bool quick_menu_show_controls; bool quick_menu_show_cheats; bool quick_menu_show_shaders; + bool quick_menu_show_save_core_overrides; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 64731bce7b..4b3d425f76 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3099,3 +3099,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index ab74e64961..bfaca3d712 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3099,3 +3099,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 4a98160856..aab4613ba1 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3093,3 +3093,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 8b4786a641..0ecad2bc88 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2962,3 +2962,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 4a0e7876d4..b68a00acf7 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3131,3 +3131,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 182180d98a..a3efe0d6a3 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3185,3 +3185,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index c806e4c6ee..341685752d 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3101,3 +3101,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index bea2016f20..e629fb3143 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3094,3 +3094,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 83352e9fe8..1caa8b5ee2 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1323,3 +1323,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS, "quick_menu_show_cheats") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SHADERS, "quick_menu_show_shaders") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "quick_menu_show_save_core_overrides") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 9196317a3e..4cfbc1bfc3 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2962,3 +2962,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 165d3949fc..b6f9455555 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4042,3 +4042,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 06608c6ea3..349943a61c 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3069,3 +3069,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index c9481f6599..a42cc4c868 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3152,3 +3152,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 32ab61d581..be4c8aa164 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3187,3 +3187,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 38e275b317..60c0b61e11 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3123,3 +3123,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, "Show Shaders") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Show/hide the 'Shaders' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show Save Core Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + "Show/hide the 'Save Core Overrides' option.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 1be70b0476..b065ca5988 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -298,6 +298,7 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_options, default_sublabel_macro(action_bind_sublabel_quick_menu_show_controls, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS) default_sublabel_macro(action_bind_sublabel_quick_menu_show_cheats, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS) default_sublabel_macro(action_bind_sublabel_quick_menu_show_shaders, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_core_overrides, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -624,6 +625,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_SHADERS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_shaders); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_save_core_overrides); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index cbd8ff161b..e05a46af97 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2949,11 +2949,14 @@ static int menu_displaylist_parse_load_content_settings( #ifdef HAVE_LAKKA if (show_advanced_settings) #endif - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CORE), - msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE), - MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE, - MENU_SETTING_ACTION, 0, 0); + if (settings->bools.quick_menu_show_save_core_overrides) + { + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CORE), + msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE), + MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE, + MENU_SETTING_ACTION, 0, 0); + } #ifdef HAVE_LAKKA if (show_advanced_settings) @@ -5406,6 +5409,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_SHOW_SHADERS, PARSE_ONLY_BOOL, false); #endif + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + PARSE_ONLY_BOOL, false); info->need_refresh = true; info->need_push = true; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index ff1d48c4f5..463d13454c 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5958,6 +5958,21 @@ static bool setting_append_list( SD_FLAG_NONE); #endif + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_save_core_overrides, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, + quick_menu_show_save_core_overrides, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_LAKKA_ADVANCED); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index ffba51ce63..071ab80293 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -717,6 +717,7 @@ enum msg_hash_enums MENU_LABEL(QUICK_MENU_SHOW_CONTROLS), MENU_LABEL(QUICK_MENU_SHOW_CHEATS), MENU_LABEL(QUICK_MENU_SHOW_SHADERS), + MENU_LABEL(QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), From 6f8201d39802d3239ef19ef4c22302d549777ee8 Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 10:53:58 +0200 Subject: [PATCH 10/13] Implemented setting for showing/hiding the "Save Game Overrides" option in the Quick Menu. --- config.def.h | 1 + configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 4 ++++ intl/msg_hash_cht.h | 4 ++++ intl/msg_hash_de.h | 4 ++++ intl/msg_hash_eo.h | 4 ++++ intl/msg_hash_fr.h | 4 ++++ intl/msg_hash_it.h | 4 ++++ intl/msg_hash_ja.h | 4 ++++ intl/msg_hash_ko.h | 4 ++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 ++++ intl/msg_hash_pt_br.h | 6 ++++++ intl/msg_hash_pt_pt.h | 4 ++++ intl/msg_hash_ru.h | 4 ++++ intl/msg_hash_us.h | 4 ++++ intl/msg_hash_vn.h | 4 ++++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ menu/menu_displaylist.c | 17 ++++++++++++----- menu/menu_setting.c | 15 +++++++++++++++ msg_hash.h | 1 + 22 files changed, 95 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index b12d534205..e6a776bb88 100644 --- a/config.def.h +++ b/config.def.h @@ -245,6 +245,7 @@ static bool quick_menu_show_controls = true; static bool quick_menu_show_cheats = true; static bool quick_menu_show_shaders = true; static bool quick_menu_show_save_core_overrides = true; +static bool quick_menu_show_save_game_overrides = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index 99ee97e9a2..9191c46392 100644 --- a/configuration.c +++ b/configuration.c @@ -1200,6 +1200,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("quick_menu_show_cheats", &settings->bools.quick_menu_show_cheats, true, quick_menu_show_cheats, false); SETTING_BOOL("quick_menu_show_shaders", &settings->bools.quick_menu_show_shaders, true, quick_menu_show_shaders, false); SETTING_BOOL("quick_menu_show_save_core_overrides", &settings->bools.quick_menu_show_save_core_overrides, true, quick_menu_show_save_core_overrides, false); + SETTING_BOOL("quick_menu_show_save_game_overrides", &settings->bools.quick_menu_show_save_game_overrides, true, quick_menu_show_save_game_overrides, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index eac229dc88..f76746f5f9 100644 --- a/configuration.h +++ b/configuration.h @@ -147,6 +147,7 @@ typedef struct settings bool quick_menu_show_cheats; bool quick_menu_show_shaders; bool quick_menu_show_save_core_overrides; + bool quick_menu_show_save_game_overrides; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 4b3d425f76..7341306e97 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3103,3 +3103,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index bfaca3d712..8228dd2f07 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3103,3 +3103,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index aab4613ba1..7a49d8e0b7 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3097,3 +3097,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 0ecad2bc88..a06a7c5b72 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2966,3 +2966,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index b68a00acf7..b4e16308dd 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3135,3 +3135,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index a3efe0d6a3..cd1bec7e74 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3189,3 +3189,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 341685752d..f8e5c751ac 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3105,3 +3105,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index e629fb3143..a9466c654a 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3098,3 +3098,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 1caa8b5ee2..d8f66d10b0 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1325,3 +1325,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SHADERS, "quick_menu_show_shaders") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "quick_menu_show_save_core_overrides") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "quick_menu_show_save_game_overrides") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 4cfbc1bfc3..2430bca33d 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2966,3 +2966,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index b6f9455555..5c2510c922 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4048,3 +4048,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 349943a61c..b01a17db09 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3073,3 +3073,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index a42cc4c868..a7358e99ac 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3156,3 +3156,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index be4c8aa164..3091071729 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3191,3 +3191,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 60c0b61e11..26cd0218c1 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3127,3 +3127,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show Save Core Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Show/hide the 'Save Core Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show Save Game Overrides") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + "Show/hide the 'Save Game Overrides' option.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index b065ca5988..f62900a3f2 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -299,6 +299,7 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_controls, default_sublabel_macro(action_bind_sublabel_quick_menu_show_cheats, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS) default_sublabel_macro(action_bind_sublabel_quick_menu_show_shaders, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS) default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_core_overrides, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_game_overrides, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -628,6 +629,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_save_core_overrides); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_save_game_overrides); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index e05a46af97..fa128513f4 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2961,11 +2961,14 @@ static int menu_displaylist_parse_load_content_settings( #ifdef HAVE_LAKKA if (show_advanced_settings) #endif - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_GAME), - msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME), - MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME, - MENU_SETTING_ACTION, 0, 0); + if (settings->bools.quick_menu_show_save_game_overrides) + { + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_GAME), + msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME), + MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME, + MENU_SETTING_ACTION, 0, 0); + } #ifdef HAVE_CHEEVOS if(settings->bools.cheevos_enable) @@ -5413,6 +5416,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + PARSE_ONLY_BOOL, false); + info->need_refresh = true; info->need_push = true; break; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 463d13454c..89abd02c9c 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5973,6 +5973,21 @@ static bool setting_append_list( general_read_handler, SD_FLAG_LAKKA_ADVANCED); + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_save_game_overrides, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, + quick_menu_show_save_game_overrides, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_LAKKA_ADVANCED); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index 071ab80293..5443d37b44 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -718,6 +718,7 @@ enum msg_hash_enums MENU_LABEL(QUICK_MENU_SHOW_CHEATS), MENU_LABEL(QUICK_MENU_SHOW_SHADERS), MENU_LABEL(QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES), + MENU_LABEL(QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), From 1053a4e38f7c4129944808a2f5d91ce938d4cdcd Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 11:16:04 +0200 Subject: [PATCH 11/13] Implemented setting for showing/hiding the "Information" option in the Quick Menu. --- config.def.h | 1 + configuration.c | 1 + configuration.h | 1 + intl/msg_hash_chs.h | 4 ++++ intl/msg_hash_cht.h | 4 ++++ intl/msg_hash_de.h | 4 ++++ intl/msg_hash_eo.h | 4 ++++ intl/msg_hash_fr.h | 4 ++++ intl/msg_hash_it.h | 4 ++++ intl/msg_hash_ja.h | 4 ++++ intl/msg_hash_ko.h | 4 ++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 4 ++++ intl/msg_hash_pt_br.h | 6 ++++++ intl/msg_hash_pt_pt.h | 4 ++++ intl/msg_hash_ru.h | 4 ++++ intl/msg_hash_us.h | 4 ++++ intl/msg_hash_vn.h | 4 ++++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ menu/menu_displaylist.c | 6 +++++- menu/menu_setting.c | 15 +++++++++++++++ msg_hash.h | 1 + 22 files changed, 88 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index e6a776bb88..b0644c373f 100644 --- a/config.def.h +++ b/config.def.h @@ -246,6 +246,7 @@ static bool quick_menu_show_cheats = true; static bool quick_menu_show_shaders = true; static bool quick_menu_show_save_core_overrides = true; static bool quick_menu_show_save_game_overrides = true; +static bool quick_menu_show_information = true; static bool menu_show_online_updater = true; diff --git a/configuration.c b/configuration.c index 9191c46392..dd68e56c5e 100644 --- a/configuration.c +++ b/configuration.c @@ -1201,6 +1201,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("quick_menu_show_shaders", &settings->bools.quick_menu_show_shaders, true, quick_menu_show_shaders, false); SETTING_BOOL("quick_menu_show_save_core_overrides", &settings->bools.quick_menu_show_save_core_overrides, true, quick_menu_show_save_core_overrides, false); SETTING_BOOL("quick_menu_show_save_game_overrides", &settings->bools.quick_menu_show_save_game_overrides, true, quick_menu_show_save_game_overrides, false); + SETTING_BOOL("quick_menu_show_information", &settings->bools.quick_menu_show_information, true, quick_menu_show_information, false); #ifdef HAVE_MATERIALUI SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false); #endif diff --git a/configuration.h b/configuration.h index f76746f5f9..67881ef436 100644 --- a/configuration.h +++ b/configuration.h @@ -148,6 +148,7 @@ typedef struct settings bool quick_menu_show_shaders; bool quick_menu_show_save_core_overrides; bool quick_menu_show_save_game_overrides; + bool quick_menu_show_information; /* Netplay */ bool netplay_public_announce; diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 7341306e97..35881b5792 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3107,3 +3107,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 8228dd2f07..c207a42888 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3107,3 +3107,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 7a49d8e0b7..5632ce4740 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3101,3 +3101,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index a06a7c5b72..0d789bb51b 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2970,3 +2970,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index b4e16308dd..dcbfbb8b74 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3139,3 +3139,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index cd1bec7e74..65a1718d6f 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3193,3 +3193,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index f8e5c751ac..86a5555108 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3109,3 +3109,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index a9466c654a..38eb32f9ae 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3102,3 +3102,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index d8f66d10b0..af5b79e5ec 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1327,3 +1327,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "quick_menu_show_save_core_overrides") MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "quick_menu_show_save_game_overrides") +MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_INFORMATION, + "quick_menu_show_information") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 2430bca33d..fd762f71d4 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2970,3 +2970,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 5c2510c922..984363b0a3 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4054,3 +4054,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option." ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information" + ) +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index b01a17db09..f20ea34bae 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3077,3 +3077,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index a7358e99ac..b58c300db3 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3160,3 +3160,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 3091071729..b3f4446db9 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -3195,3 +3195,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 26cd0218c1..55fa1417d9 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3131,3 +3131,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show Save Game Overrides") MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, "Show/hide the 'Save Game Overrides' option.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "Show Information") +MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Show/hide the 'Information' option.") diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index f62900a3f2..da7e251cc7 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -300,6 +300,7 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_cheats, default_sublabel_macro(action_bind_sublabel_quick_menu_show_shaders, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS) default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_core_overrides, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES) default_sublabel_macro(action_bind_sublabel_quick_menu_show_save_game_overrides, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES) +default_sublabel_macro(action_bind_sublabel_quick_menu_show_information, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION) default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES) default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -632,6 +633,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_save_game_overrides); break; + case MENU_ENUM_LABEL_QUICK_MENU_SHOW_INFORMATION: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_information); + break; case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index fa128513f4..91724dcd98 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3058,7 +3058,7 @@ static int menu_displaylist_parse_horizontal_content_actions( MENU_SETTING_ACTION_DELETE_ENTRY, 0, 0); } - if (!string_is_empty(db_name)) + if (settings->bools.quick_menu_show_information && !string_is_empty(db_name)) { char *db_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); @@ -5420,6 +5420,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_INFORMATION, + PARSE_ONLY_BOOL, false); + info->need_refresh = true; info->need_push = true; break; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 89abd02c9c..64bea69f60 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5988,6 +5988,21 @@ static bool setting_append_list( general_read_handler, SD_FLAG_LAKKA_ADVANCED); + CONFIG_BOOL( + list, list_info, + &settings->bools.quick_menu_show_information, + MENU_ENUM_LABEL_QUICK_MENU_SHOW_INFORMATION, + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + quick_menu_show_information, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4)) { CONFIG_BOOL( diff --git a/msg_hash.h b/msg_hash.h index 5443d37b44..fb38c9f06c 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -719,6 +719,7 @@ enum msg_hash_enums MENU_LABEL(QUICK_MENU_SHOW_SHADERS), MENU_LABEL(QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES), MENU_LABEL(QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES), + MENU_LABEL(QUICK_MENU_SHOW_INFORMATION), /* UI settings */ MENU_LABEL(VIDEO_DISABLE_COMPOSITION), From c7da6e1ca8cd186df5c8eff709bb7d20d28b0dc3 Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 11:21:10 +0200 Subject: [PATCH 12/13] Fix issue with "Information" option being hidden when launching content. --- menu/menu_displaylist.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 91724dcd98..f0357d7316 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3018,8 +3018,10 @@ static int menu_displaylist_parse_horizontal_content_actions( playlist_get_index(playlist, idx, &entry_path, &label, &core_path, &core_name, NULL, &db_name); - if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL) - && string_is_equal(menu->deferred_path, fullpath)) + bool content_loaded = !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL) + && string_is_equal(menu->deferred_path, fullpath); + + if (content_loaded) menu_displaylist_parse_load_content_settings(info); else { @@ -3058,7 +3060,8 @@ static int menu_displaylist_parse_horizontal_content_actions( MENU_SETTING_ACTION_DELETE_ENTRY, 0, 0); } - if (settings->bools.quick_menu_show_information && !string_is_empty(db_name)) + if (!string_is_empty(db_name) && (!content_loaded || + (content_loaded && settings->bools.quick_menu_show_information))) { char *db_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); From fd07c57ed5b46e2340c91d3ca04b45ae810b61c1 Mon Sep 17 00:00:00 2001 From: Mikael Brunnhede Date: Mon, 9 Oct 2017 12:30:36 +0200 Subject: [PATCH 13/13] Fixed merge issue. --- intl/msg_hash_pt_br.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 54e8d56f93..e5c6c3f25f 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -4101,4 +4101,4 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, ) MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, "Show/hide the 'Information' option." - \ No newline at end of file + )