@@ -322,6 +322,7 @@ static float GetEffectiveFloatSetting(SettingsInterface* bsi, const char* sectio
322322 float default_value);
323323static TinyString GetEffectiveTinyStringSetting (SettingsInterface* bsi, const char * section, const char * key,
324324 const char * default_value);
325+ static void BeginResetSettings ();
325326static void DoCopyGameSettings ();
326327static void DoClearGameSettings ();
327328static void CopyGlobalControllerSettingsToGame ();
@@ -3465,6 +3466,20 @@ void FullscreenUI::PopulatePatchesAndCheatsList()
34653466 s_state.game_settings_interface ->GetStringList (Cheats::CHEATS_CONFIG_SECTION , Cheats::PATCH_ENABLE_CONFIG_KEY );
34663467}
34673468
3469+ void FullscreenUI::BeginResetSettings ()
3470+ {
3471+ OpenConfirmMessageDialog (FSUI_STR (" Restore Defaults" ),
3472+ FSUI_STR (" Are you sure you want to restore the default settings? Any preferences will be "
3473+ " lost.\n\n You cannot undo this action." ),
3474+ [](bool result) {
3475+ if (!result)
3476+ return ;
3477+
3478+ Host::RequestResetSettings (true , false );
3479+ ShowToast (std::string (), FSUI_STR (" Settings reset to default." ));
3480+ });
3481+ }
3482+
34683483void FullscreenUI::DoCopyGameSettings ()
34693484{
34703485 if (!s_state.game_settings_interface )
@@ -3966,6 +3981,15 @@ void FullscreenUI::DrawInterfaceSettingsPage()
39663981 FSUI_CSTR (" Shows enhancement settings in the bottom-right corner of the screen." ), " Display" ,
39673982 " ShowEnhancements" , false );
39683983
3984+ MenuHeading (FSUI_CSTR (" Operations" ));
3985+ {
3986+ if (MenuButton (FSUI_ICONSTR (ICON_FA_DUMPSTER_FIRE , " Restore Defaults" ),
3987+ FSUI_CSTR (" Resets all settings to the defaults." )))
3988+ {
3989+ BeginResetSettings ();
3990+ }
3991+ }
3992+
39693993 EndMenuButtons ();
39703994}
39713995
@@ -4413,9 +4437,7 @@ void FullscreenUI::BeginResetControllerSettings()
44134437 if (!result)
44144438 return ;
44154439
4416- SettingsInterface* dsi = GetEditingSettingsInterface ();
4417-
4418- Settings::SetDefaultControllerConfig (*dsi);
4440+ Host::RequestResetSettings (false , true );
44194441 ShowToast (std::string (), FSUI_STR (" Controller settings reset to default." ));
44204442 });
44214443}
@@ -8824,6 +8846,7 @@ TRANSLATE_NOOP("FullscreenUI", "Apply Image Patches");
88248846TRANSLATE_NOOP("FullscreenUI", "Are you sure you want to clear all mappings for this controller?\n\nYou cannot undo this action.");
88258847TRANSLATE_NOOP("FullscreenUI", "Are you sure you want to clear the current post-processing chain? All configuration will be lost.");
88268848TRANSLATE_NOOP("FullscreenUI", "Are you sure you want to restore the default controller configuration?\n\nAll bindings and configuration will be lost. You cannot undo this action.");
8849+ TRANSLATE_NOOP("FullscreenUI", "Are you sure you want to restore the default settings? Any preferences will be lost.\n\nYou cannot undo this action.");
88278850TRANSLATE_NOOP("FullscreenUI", "Aspect Ratio");
88288851TRANSLATE_NOOP("FullscreenUI", "Attempts to detect one pixel high/wide lines that rely on non-upscaled rasterization behavior, filling in gaps introduced by upscaling.");
88298852TRANSLATE_NOOP("FullscreenUI", "Attempts to map the selected port to a chosen controller.");
@@ -8916,6 +8939,7 @@ TRANSLATE_NOOP("FullscreenUI", "Culling Correction");
89168939TRANSLATE_NOOP("FullscreenUI", "Current Game");
89178940TRANSLATE_NOOP("FullscreenUI", "Custom");
89188941TRANSLATE_NOOP("FullscreenUI", "Dark");
8942+ TRANSLATE_NOOP("FullscreenUI", "Dark Ruby");
89198943TRANSLATE_NOOP("FullscreenUI", "Deadzone");
89208944TRANSLATE_NOOP("FullscreenUI", "Debugging Settings");
89218945TRANSLATE_NOOP("FullscreenUI", "Default");
@@ -9256,8 +9280,10 @@ TRANSLATE_NOOP("FullscreenUI", "Reset Play Time");
92569280TRANSLATE_NOOP("FullscreenUI", "Reset Settings");
92579281TRANSLATE_NOOP("FullscreenUI", "Reset System");
92589282TRANSLATE_NOOP("FullscreenUI", "Resets all configuration to defaults (including bindings).");
9283+ TRANSLATE_NOOP("FullscreenUI", "Resets all settings to the defaults.");
92599284TRANSLATE_NOOP("FullscreenUI", "Resets memory card directory to default (user directory).");
92609285TRANSLATE_NOOP("FullscreenUI", "Resolution change will be applied after restarting.");
9286+ TRANSLATE_NOOP("FullscreenUI", "Restore Defaults");
92619287TRANSLATE_NOOP("FullscreenUI", "Restores the state of the system prior to the last state loaded.");
92629288TRANSLATE_NOOP("FullscreenUI", "Resume Game");
92639289TRANSLATE_NOOP("FullscreenUI", "Resume Last Session");
@@ -9334,6 +9360,7 @@ TRANSLATE_NOOP("FullscreenUI", "Sets which sort of memory card image will be use
93349360TRANSLATE_NOOP("FullscreenUI", "Setting {} binding {}.");
93359361TRANSLATE_NOOP("FullscreenUI", "Settings");
93369362TRANSLATE_NOOP("FullscreenUI", "Settings and Operations");
9363+ TRANSLATE_NOOP("FullscreenUI", "Settings reset to default.");
93379364TRANSLATE_NOOP("FullscreenUI", "Shader {} added as stage {}.");
93389365TRANSLATE_NOOP("FullscreenUI", "Shared Card Name");
93399366TRANSLATE_NOOP("FullscreenUI", "Show Achievement Trophy Icons");
0 commit comments