diff --git a/command.c b/command.c index 870cd3b8c1..db40941531 100644 --- a/command.c +++ b/command.c @@ -2439,6 +2439,9 @@ TODO: Add a setting for these tweaks */ command_event(CMD_EVENT_QUIT, NULL); #endif break; + case CMD_EVENT_MENU_RESET_TO_DEFAULT_CONFIG: + config_set_defaults(); + break; case CMD_EVENT_MENU_SAVE_CURRENT_CONFIG: command_event_save_current_config(OVERRIDE_NONE); break; diff --git a/command.h b/command.h index c7a0d020b5..134504cadb 100644 --- a/command.h +++ b/command.h @@ -149,6 +149,7 @@ enum event_command /* Unpauses retroArch. */ CMD_EVENT_PAUSE, CMD_EVENT_PAUSE_CHECKS, + CMD_EVENT_MENU_RESET_TO_DEFAULT_CONFIG, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CORE, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR, diff --git a/configuration.c b/configuration.c index d8c8018b8d..7a26c0b916 100644 --- a/configuration.c +++ b/configuration.c @@ -1666,7 +1666,7 @@ static struct config_int_setting *populate_settings_int(settings_t *settings, in * * Set 'default' configuration values. **/ -static void config_set_defaults(void) +void config_set_defaults(void) { unsigned i, j; #ifdef HAVE_MENU diff --git a/configuration.h b/configuration.h index 9587c9250c..865f7058d9 100644 --- a/configuration.h +++ b/configuration.h @@ -721,6 +721,8 @@ bool config_init(void); bool config_overlay_enable_default(void); +void config_set_defaults(void); + void config_free(void); settings_t *config_get_ptr(void); diff --git a/intl/msg_hash_ar.h b/intl/msg_hash_ar.h index 132292415c..025622c33a 100644 --- a/intl/msg_hash_ar.h +++ b/intl/msg_hash_ar.h @@ -3659,3 +3659,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index c19d47e875..df88d9eeb4 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -3443,3 +3443,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 5be8b2a3c7..f1c1e92975 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3435,3 +3435,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 70645638d1..3a25beb04e 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3545,3 +3545,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index dbe94933ea..7d2cecd2ea 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -3310,3 +3310,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h index 19d6cf5839..e5279db2c2 100644 --- a/intl/msg_hash_es.h +++ b/intl/msg_hash_es.h @@ -7594,3 +7594,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index ce408a6a9d..4f4147b749 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -3469,3 +3469,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 5911f8c854..02b85b8081 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3529,3 +3529,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index f03253da9f..41c2cfad8b 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -3932,3 +3932,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 0e4dcb59f7..3b4702551f 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -3430,3 +3430,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index c191f38f36..f4cba8bbb1 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1711,3 +1711,5 @@ MSG_HASH(MENU_ENUM_LABEL_STREAMING_MODE, "streaming_mode") MSG_HASH(MENU_ENUM_LABEL_STREAMING_TITLE, "streaming_title") +MSG_HASH(MENU_ENUM_LABEL_RESET_TO_DEFAULT_CONFIG, + "reset_to_default_config") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 123ac8fa67..8edb858a50 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -3304,3 +3304,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h index cbdcae33b8..3c5d7d3fcc 100644 --- a/intl/msg_hash_pl.h +++ b/intl/msg_hash_pl.h @@ -3732,3 +3732,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 549607f257..5d6b51d0ca 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -7548,3 +7548,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index bd656e31ac..307e9b2c0d 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3396,3 +3396,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index f637ced219..317bd94ce9 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3599,3 +3599,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 72a62c7dff..0c5b569108 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -7618,3 +7618,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 5e9ec23d87..329e469c83 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3467,3 +3467,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, "Split Joy-Con" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Reset To Defaults" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Reset the current configuration to default values." + ) diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 244d25877e..21235de14e 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -66,6 +66,7 @@ default_sublabel_macro(menu_action_sublabel_setting_audio_mixer_stream_remove, MENU_ENUM_SUBLABEL_MIXER_ACTION_REMOVE) default_sublabel_macro(menu_action_sublabel_setting_audio_mixer_stream_volume, MENU_ENUM_SUBLABEL_MIXER_ACTION_VOLUME) +default_sublabel_macro(action_bind_sublabel_reset_to_default_config, MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG) default_sublabel_macro(action_bind_sublabel_quick_menu_override_options, MENU_ENUM_SUBLABEL_QUICK_MENU_OVERRIDE_OPTIONS) default_sublabel_macro(action_bind_sublabel_quick_menu_start_streaming, MENU_ENUM_SUBLABEL_QUICK_MENU_START_STREAMING) default_sublabel_macro(action_bind_sublabel_quick_menu_start_recording, MENU_ENUM_SUBLABEL_QUICK_MENU_START_RECORDING) @@ -1138,6 +1139,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_SHADER_OPTIONS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_shader_options); break; + case MENU_ENUM_LABEL_RESET_TO_DEFAULT_CONFIG: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_reset_to_default_config); + break; case MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_save_current_config_override_game); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index c4a6112baf..c0a72bbbd2 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2994,6 +2994,12 @@ static int menu_displaylist_parse_configurations_list( MENU_ENUM_LABEL_CONFIGURATIONS, MENU_SETTING_ACTION, 0, 0); + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG), + msg_hash_to_str(MENU_ENUM_LABEL_RESET_TO_DEFAULT_CONFIG), + MENU_ENUM_LABEL_RESET_TO_DEFAULT_CONFIG, + MENU_SETTING_ACTION, 0, 0); + menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG), msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG), diff --git a/menu/menu_setting.c b/menu/menu_setting.c index ae4e2ff193..988c899d5e 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -3548,6 +3548,16 @@ static bool setting_append_list( parent_group); settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED); + CONFIG_ACTION( + list, list_info, + MENU_ENUM_LABEL_RESET_TO_DEFAULT_CONFIG, + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + &group_info, + &subgroup_info, + parent_group); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_RESET_TO_DEFAULT_CONFIG); + settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED); + CONFIG_ACTION( list, list_info, MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG, diff --git a/msg_hash.h b/msg_hash.h index fb852b2ac4..78cf6beb58 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1860,6 +1860,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT_DESC, + MENU_LABEL(RESET_TO_DEFAULT_CONFIG), MENU_LABEL(SAVE_CURRENT_CONFIG), MENU_LABEL(SAVE_CURRENT_CONFIG_OVERRIDE_CORE), MENU_LABEL(SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR),