mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
Atomic PARAM.SFO writes
This commit is contained in:
parent
0878db4e17
commit
932f31e37b
9 changed files with 108 additions and 11 deletions
|
@ -190,8 +190,9 @@ void emu_settings::SaveSettings()
|
|||
}
|
||||
|
||||
// Save config atomically
|
||||
fs::file(config_name + ".tmp", fs::rewrite).write(out.c_str(), out.size());
|
||||
fs::rename(config_name + ".tmp", config_name, true);
|
||||
fs::pending_file temp(config_name);
|
||||
temp.file.write(out.c_str(), out.size());
|
||||
temp.commit();
|
||||
|
||||
// Check if the running config/title is the same as the edited config/title.
|
||||
if (config_name == g_cfg.name || m_title_id == Emu.GetTitleID())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue