aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaelTheShifter <[email protected]>2016-07-05 19:30:28 -0400
committerMichaelTheShifter <[email protected]>2016-07-05 19:30:28 -0400
commit73ec1f27baf9441cbb4bba83599c4d9c467bf6a9 (patch)
tree68b937525b48c6cdb74882a18b1fc21832e98619
parentb2b7d4c442dffc518f0f29d3fabb9c06ea9c4229 (diff)
downloadshiftos-c-_theultimatehacker-73ec1f27baf9441cbb4bba83599c4d9c467bf6a9.tar.gz
shiftos-c-_theultimatehacker-73ec1f27baf9441cbb4bba83599c4d9c467bf6a9.tar.bz2
shiftos-c-_theultimatehacker-73ec1f27baf9441cbb4bba83599c4d9c467bf6a9.zip
Fix issue with game settings breaking new saves.
-rw-r--r--source/WindowsFormsApplication1/Program.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/WindowsFormsApplication1/Program.cs b/source/WindowsFormsApplication1/Program.cs
index 555ed9c..0cb9096 100644
--- a/source/WindowsFormsApplication1/Program.cs
+++ b/source/WindowsFormsApplication1/Program.cs
@@ -54,17 +54,6 @@ namespace ShiftOS
poolThread.Start();
//Start the Windows Forms backend
Paths.RegisterPaths(); //Sets ShiftOS path variables based on the current OS.
- if (File.Exists(Paths.SystemDir + "settings.json"))
- {
- API.LoadedSettings = JsonConvert.DeserializeObject<Settings>(File.ReadAllText(Paths.SystemDir + "settings.json"));
- }
- else
- {
- API.LoadedSettings = new Settings();
- API.LoadedSettings.MusicVolume = 50;
- File.WriteAllText(Paths.SystemDir + "settings.json", JsonConvert.SerializeObject(API.LoadedSettings));
- }
- Audio.LoadAudioData();
SaveSystem.Utilities.CheckForOlderSaves(); //Backs up C:\ShiftOS on Windows systems if it exists and doesn't contain a _engineInfo.txt file telling ShiftOS what engine created it.
//If there isn't a save folder at the directory specified by ShiftOS.Paths.SaveRoot, create a new save.
//If not, load that save.
@@ -76,6 +65,17 @@ namespace ShiftOS
{
SaveSystem.Utilities.NewGame();
}
+ if (File.Exists(Paths.SystemDir + "settings.json"))
+ {
+ API.LoadedSettings = JsonConvert.DeserializeObject<Settings>(File.ReadAllText(Paths.SystemDir + "settings.json"));
+ }
+ else
+ {
+ API.LoadedSettings = new Settings();
+ API.LoadedSettings.MusicVolume = 50;
+ File.WriteAllText(Paths.SystemDir + "settings.json", JsonConvert.SerializeObject(API.LoadedSettings));
+ }
+ Audio.LoadAudioData();
//Load ShiftOS skin
Skinning.Utilities.loadskin();
SaveSystem.ShiftoriumRegistry.UpdateShiftorium();