From b1513d8e5de991f98e2ecfbf9ee206d567a9fcf9 Mon Sep 17 00:00:00 2001 From: Bitl Date: Tue, 14 Jul 2020 16:20:52 -0700 Subject: [PATCH] update the map path if the file doesn't exist and write to config. --- .../NovetusCore/StorageAndFunctions/GlobalFuncs.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs index 1d03058..2206a2a 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs @@ -190,8 +190,19 @@ public class GlobalFuncs } GlobalVars.UserConfiguration.DiscordPresence = Convert.ToBoolean(discord); - GlobalVars.UserConfiguration.MapPath = mappath; GlobalVars.UserConfiguration.MapPathSnip = mapsnip; + + //update the map path if the file doesn't exist and write to config. + if (File.Exists(mappath)) + { + GlobalVars.UserConfiguration.MapPath = mappath; + } + else + { + GlobalVars.UserConfiguration.MapPath = GlobalPaths.BasePath + @"\\" + GlobalVars.UserConfiguration.MapPathSnip; + Config(cfgpath, true); + } + GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.GetModeForInt(Convert.ToInt32(graphics)); GlobalVars.UserConfiguration.ReShade = Convert.ToBoolean(reshade); GlobalVars.UserConfiguration.QualityLevel = Settings.GraphicsOptions.GetLevelForInt(Convert.ToInt32(qualitylevel));