Leave the settings as they are when they are written

Writing the settings put them right for the simulator, DLSS to TAA on OpenGL
and the like, in the object given. A preview of the changes or a look at the
levels goes through the same write and changed the held settings. A copy is
put right now.
This commit is contained in:
maj00r
2026-11-03 21:51:54 +01:00
parent 02ea1277fc
commit cf1ba319c1

View File

@@ -237,8 +237,13 @@ public sealed class SettingsSerializer
"starter.developertools", "starter.developertools",
}; };
public void Write(SimulatorSettings s, ConfigFile c) /// <summary>
/// The settings into <paramref name="c"/> as the simulator would run with them,
/// which leaves <paramref name="settings"/> as they are: a preview writes them too.
/// </summary>
public void Write(SimulatorSettings settings, ConfigFile c)
{ {
var s = settings.Copy();
GraphicsRules.Normalize(s, _dlssPlatform); GraphicsRules.Normalize(s, _dlssPlatform);
c.Set("lang", string.IsNullOrWhiteSpace(s.LanguageCode) c.Set("lang", string.IsNullOrWhiteSpace(s.LanguageCode)