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),