mirror of https://github.com/PCSX2/pcsx2.git
VMManager: Fix toggling game fixes per-game (stuck enabled)
This commit is contained in:
parent
f8d9e6eeb8
commit
a020e985f2
|
@ -1025,6 +1025,9 @@ struct Pcsx2Config
|
||||||
// You shouldn't assign to this class, because it'll mess with the runtime variables (Current...).
|
// You shouldn't assign to this class, because it'll mess with the runtime variables (Current...).
|
||||||
// But you can still use this to copy config. Only needed until we drop wx.
|
// But you can still use this to copy config. Only needed until we drop wx.
|
||||||
void CopyConfig(const Pcsx2Config& cfg);
|
void CopyConfig(const Pcsx2Config& cfg);
|
||||||
|
|
||||||
|
/// Copies runtime configuration settings (e.g. frame limiter state).
|
||||||
|
void CopyRuntimeConfig(Pcsx2Config& cfg);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Pcsx2Config EmuConfig;
|
extern Pcsx2Config EmuConfig;
|
||||||
|
|
|
@ -1238,6 +1238,17 @@ void Pcsx2Config::CopyConfig(const Pcsx2Config& cfg)
|
||||||
LimiterMode = cfg.LimiterMode;
|
LimiterMode = cfg.LimiterMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Pcsx2Config::CopyRuntimeConfig(Pcsx2Config& cfg)
|
||||||
|
{
|
||||||
|
GS.LimitScalar = cfg.GS.LimitScalar;
|
||||||
|
UseBOOT2Injection = cfg.UseBOOT2Injection;
|
||||||
|
CurrentBlockdump = std::move(cfg.CurrentBlockdump);
|
||||||
|
CurrentIRX = std::move(cfg.CurrentIRX);
|
||||||
|
CurrentGameArgs = std::move(cfg.CurrentGameArgs);
|
||||||
|
CurrentAspectRatio = cfg.CurrentAspectRatio;
|
||||||
|
LimiterMode = cfg.LimiterMode;
|
||||||
|
}
|
||||||
|
|
||||||
void EmuFolders::SetDefaults(SettingsInterface& si)
|
void EmuFolders::SetDefaults(SettingsInterface& si)
|
||||||
{
|
{
|
||||||
si.SetStringValue("Folders", "Bios", "bios");
|
si.SetStringValue("Folders", "Bios", "bios");
|
||||||
|
|
|
@ -1673,7 +1673,11 @@ void VMManager::ApplySettings()
|
||||||
GetMTGS().WaitGS(false);
|
GetMTGS().WaitGS(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Pcsx2Config old_config(EmuConfig);
|
// Reset to a clean Pcsx2Config. Otherwise things which are optional (e.g. gamefixes)
|
||||||
|
// do not use the correct default values when loading.
|
||||||
|
Pcsx2Config old_config(std::move(EmuConfig));
|
||||||
|
EmuConfig = Pcsx2Config();
|
||||||
|
EmuConfig.CopyRuntimeConfig(old_config);
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
CheckForConfigChanges(old_config);
|
CheckForConfigChanges(old_config);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue