mirror of https://github.com/PCSX2/pcsx2.git
Qt: Fix Enable Per-Game Settings option
This commit is contained in:
parent
b30e93389c
commit
5026dda9ca
|
@ -49,10 +49,17 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsDialog* dialog, QWidget
|
|||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.cheats, "EmuCore", "EnableCheats", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.widescreenPatches, "EmuCore", "EnableWideScreenPatches", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.noInterlacingPatches, "EmuCore", "EnableNoInterlacingPatches", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.perGameSettings, "EmuCore", "EnablePerGameSettings", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hostFilesystem, "EmuCore", "HostFs", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.warnAboutUnsafeSettings, "EmuCore", "WarnAboutUnsafeSettings", true);
|
||||
|
||||
// Per-game settings is special, we don't want to bind it if we're editing per-game settings.
|
||||
m_ui.perGameSettings->setEnabled(!dialog->isPerGameSettings());
|
||||
if (!dialog->isPerGameSettings())
|
||||
{
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.perGameSettings, "EmuCore", "EnablePerGameSettings", true);
|
||||
connect(m_ui.perGameSettings, &QCheckBox::stateChanged, g_emu_thread, &EmuThread::reloadGameSettings);
|
||||
}
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.normalSpeed, tr("Normal Speed"), "100%",
|
||||
tr("Sets the target emulation speed. It is not guaranteed that this speed will be reached, "
|
||||
"and if not, the emulator will run as fast as it can manage."));
|
||||
|
|
|
@ -2633,8 +2633,11 @@ void FullscreenUI::DrawEmulationSettingsPage()
|
|||
"EnableWideScreenPatches", false);
|
||||
DrawToggleSetting(bsi, "Enable No-Interlacing Patches", "Enables loading no-interlacing patches from pnach files.", "EmuCore",
|
||||
"EnableNoInterlacingPatches", false);
|
||||
DrawToggleSetting(bsi, "Enable Per-Game Settings", "Enables loading ini overlays from gamesettings, or custom settings per-game.",
|
||||
"EmuCore", "EnablePerGameSettings", true);
|
||||
if (DrawToggleSetting(bsi, "Enable Per-Game Settings", "Enables loading ini overlays from gamesettings, or custom settings per-game.",
|
||||
"EmuCore", "EnablePerGameSettings", IsEditingGameSettings(bsi)))
|
||||
{
|
||||
Host::RunOnCPUThread(&VMManager::ReloadGameSettings);
|
||||
}
|
||||
DrawToggleSetting(bsi, "Enable Host Filesystem", "Enables access to files from the host: namespace in the virtual machine.", "EmuCore",
|
||||
"HostFs", false);
|
||||
DrawToggleSetting(bsi, "Warn About Unsafe Settings", "Displays warnings when settings are enabled which may break games.", "EmuCore",
|
||||
|
|
|
@ -421,7 +421,7 @@ void VMManager::RequestDisplaySize(float scale /*= 0.0f*/)
|
|||
bool VMManager::UpdateGameSettingsLayer()
|
||||
{
|
||||
std::unique_ptr<INISettingsInterface> new_interface;
|
||||
if (s_game_crc != 0)
|
||||
if (s_game_crc != 0 && Host::GetBaseBoolSettingValue("EmuCore", "EnablePerGameSettings", true))
|
||||
{
|
||||
std::string filename(GetGameSettingsPath(s_game_serial.c_str(), s_game_crc));
|
||||
if (!FileSystem::FileExists(filename.c_str()))
|
||||
|
|
Loading…
Reference in New Issue