don't save preferences when replaying

This commit is contained in:
2024-07-27 16:13:51 -05:00
committed by Celtic Minstrel
parent 7ea9810b09
commit 3f69819c35

View File

@@ -72,6 +72,9 @@ void clear_pref(std::string keypath) {
} }
static bool save_prefs(fs::path fpath) { static bool save_prefs(fs::path fpath) {
// Don't save preferences when running a replay which might change them
if(replaying) return true;
if(!prefsDirty) return true; if(!prefsDirty) return true;
fs::create_directories(fpath.parent_path()); fs::create_directories(fpath.parent_path());
std::ofstream fout(fpath.string().c_str()); std::ofstream fout(fpath.string().c_str());