mirror of https://github.com/PCSX2/pcsx2.git
Settings: Clearing settings disables Cheats/Patches
The 'Clear Settings' button will now disable all cheats and patches from the configuration. This will allow quickly resetting to having no game altering pnach patches/cheats.
This commit is contained in:
parent
85c3a413fa
commit
6f0aef3344
|
@ -80,6 +80,13 @@ void GameCheatSettingsWidget::updateListEnabled()
|
||||||
m_ui.reloadCheats->setEnabled(cheats_enabled);
|
m_ui.reloadCheats->setEnabled(cheats_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameCheatSettingsWidget::disableAllCheats()
|
||||||
|
{
|
||||||
|
SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||||
|
si->ClearSection(Patch::CHEATS_CONFIG_SECTION);
|
||||||
|
si->Save();
|
||||||
|
}
|
||||||
|
|
||||||
void GameCheatSettingsWidget::setCheatEnabled(std::string name, bool enabled, bool save_and_reload_settings)
|
void GameCheatSettingsWidget::setCheatEnabled(std::string name, bool enabled, bool save_and_reload_settings)
|
||||||
{
|
{
|
||||||
SettingsInterface* si = m_dialog->getSettingsInterface();
|
SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||||
|
|
|
@ -28,6 +28,7 @@ class GameCheatSettingsWidget : public QWidget
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GameCheatSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
GameCheatSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
|
void disableAllCheats();
|
||||||
~GameCheatSettingsWidget();
|
~GameCheatSettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
|
|
@ -71,6 +71,13 @@ void GamePatchSettingsWidget::onReloadClicked()
|
||||||
g_emu_thread->reloadPatches();
|
g_emu_thread->reloadPatches();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GamePatchSettingsWidget::disableAllPatches()
|
||||||
|
{
|
||||||
|
SettingsInterface* si = m_dialog->getSettingsInterface();
|
||||||
|
si->ClearSection(Patch::PATCHES_CONFIG_SECTION);
|
||||||
|
si->Save();
|
||||||
|
}
|
||||||
|
|
||||||
void GamePatchSettingsWidget::reloadList()
|
void GamePatchSettingsWidget::reloadList()
|
||||||
{
|
{
|
||||||
// Patches shouldn't have any unlabelled patch groups, because they're new.
|
// Patches shouldn't have any unlabelled patch groups, because they're new.
|
||||||
|
|
|
@ -41,6 +41,7 @@ class GamePatchSettingsWidget : public QWidget
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GamePatchSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
GamePatchSettingsWidget(SettingsWindow* dialog, QWidget* parent);
|
||||||
|
void disableAllPatches();
|
||||||
~GamePatchSettingsWidget();
|
~GamePatchSettingsWidget();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
|
|
@ -314,6 +314,9 @@ void SettingsWindow::onClearSettingsClicked()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_game_cheat_settings_widget->disableAllCheats();
|
||||||
|
m_game_patch_settings_widget->disableAllPatches();
|
||||||
|
|
||||||
Pcsx2Config::ClearConfiguration(m_sif.get());
|
Pcsx2Config::ClearConfiguration(m_sif.get());
|
||||||
m_sif->Save();
|
m_sif->Save();
|
||||||
g_emu_thread->reloadGameSettings();
|
g_emu_thread->reloadGameSettings();
|
||||||
|
|
Loading…
Reference in New Issue