Skip to content

Commit

Permalink
Settings: Persist OSD options when resetting
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Oct 8, 2022
1 parent 1745d3e commit 3a3f571
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
9 changes: 9 additions & 0 deletions src/core/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,15 @@ void System::LoadSettings(bool display_osd_messages)
void System::SetDefaultSettings(SettingsInterface& si)
{
Settings temp;

// we don't want to reset some things (e.g. OSD)
temp.display_show_osd_messages = g_settings.display_show_osd_messages;
temp.display_show_fps = g_settings.display_show_fps;
temp.display_show_speed = g_settings.display_show_speed;
temp.display_show_resolution = g_settings.display_show_resolution;
temp.display_show_cpu = g_settings.display_show_cpu;
temp.display_show_gpu = g_settings.display_show_gpu;

temp.Save(si);
}

Expand Down
11 changes: 1 addition & 10 deletions src/frontend-common/common_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,18 +287,9 @@ void CommonHost::SetDefaultSettings(SettingsInterface& si)
si.SetBoolValue("Main", "EnableDiscordPresence", false);
#endif

#ifdef WITH_CHEEVOS
si.SetBoolValue("Cheevos", "Enabled", false);
si.SetBoolValue("Cheevos", "TestMode", false);
si.SetBoolValue("Cheevos", "UnofficialTestMode", false);
si.SetBoolValue("Cheevos", "UseFirstDiscFromPlaylist", true);
si.DeleteValue("Cheevos", "Username");
si.DeleteValue("Cheevos", "Token");

#ifdef WITH_RAINTEGRATION
#if defined(WITH_CHEEVOS) && defined(WITH_RAINTEGRATION)
si.SetBoolValue("Cheevos", "UseRAIntegration", false);
#endif
#endif
}

void CommonHost::SetDefaultControllerSettings(SettingsInterface& si)
Expand Down

0 comments on commit 3a3f571

Please sign in to comment.