private static void InitLauncherSettings() { if (AreLauncherSettingsInitialized) { return; } LauncherSettings = new LauncherSettings(); if (File.Exists(HLVRPaths.VRLauncherSettingsFile)) { AreLauncherSettingsInitialized = TryLoadSettings(HLVRPaths.VRLauncherSettingsFile) && TryStoreSettings(LauncherSettings, HLVRPaths.VRLauncherSettingsFile); } else { AreLauncherSettingsInitialized = TryStoreSettings(LauncherSettings, HLVRPaths.VRLauncherSettingsFile); } if (string.IsNullOrEmpty(HLVRPaths.HLDirectory)) { HLVRPaths.RestoreLastHLDirectory(); } }
public static void RestoreLauncherSettings() { LauncherSettings defaultSettings = new LauncherSettings(); LauncherSettings.GeneralSettings = defaultSettings.GeneralSettings; DelayedStoreLauncherSettings(); }