Qt: Make 'Clear Settings' in Game Properties clear ini

Same as fullscreen UI.
This commit is contained in:
Stenzek
2026-01-12 20:47:30 +10:00
parent 08131302cd
commit f9bf0cb128
3 changed files with 1 additions and 30 deletions

View File

@@ -901,34 +901,6 @@ void Settings::Save(SettingsInterface& si, bool ignore_base) const
si.SetStringValue("PCDrv", "Root", pcdrv_root.c_str());
}
void Settings::Clear(SettingsInterface& si)
{
si.ClearSection("Main");
si.ClearSection("Console");
si.ClearSection("CPU");
si.ClearSection("GPU");
si.ClearSection("Display");
si.ClearSection("CDROM");
si.ClearSection("Audio");
si.ClearSection("Hacks");
si.ClearSection("PCDrv");
si.ClearSection("BIOS");
si.ClearSection("ControllerPorts");
for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++)
si.ClearSection(Controller::GetSettingsSection(i).c_str());
si.ClearSection("MemoryCards");
si.ClearSection("Cheevos");
si.ClearSection("Logging");
si.ClearSection("Debug");
si.ClearSection("TextureReplacements");
// Cheats/patches have to be removed too.
si.ClearSection("Cheats");
si.ClearSection("Patches");
}
bool Settings::TextureReplacementSettings::Configuration::operator==(const Configuration& rhs) const
{
return (max_hash_cache_entries == rhs.max_hash_cache_entries &&

View File

@@ -443,7 +443,6 @@ struct Settings : public GPUSettings
void Load(const SettingsInterface& si, const SettingsInterface& controller_si);
void LoadPGXPSettings(const SettingsInterface& si);
void Save(SettingsInterface& si, bool ignore_base) const;
static void Clear(SettingsInterface& si);
void ApplySettingRestrictions();
void FixIncompatibleSettings(const SettingsInterface& si, bool display_osd_messages);

View File

@@ -344,7 +344,7 @@ void SettingsWindow::onClearSettingsClicked()
return;
}
Settings::Clear(*m_sif.get());
m_sif->Clear();
saveAndReloadGameSettings();
reloadPages();