private void LoadConfig() { try { Config config = ConfigReader.Read("Config.json"); cyclesPerSecond = config.CyclesPerSecond; timerUpdatesPerSecond = config.TimerUpdatesPerSecond; rewindBufferSize = config.RewindBufferSize; rewindFrequency = config.RewindFrequency; savestateSlots = config.SavestateSlots; offColor = ColorTranslator.FromHexString(config.OffColor); onColor = ColorTranslator.FromHexString(config.OnColor); } catch (Exception) { ConfigReader.Save("Config.json", new Config()); onColor = ColorTranslator.FromHexString("#414234"); offColor = ColorTranslator.FromHexString("#bac2ac"); } }