From f69faa7ffed0457b66999118506efe26dd04cef4 Mon Sep 17 00:00:00 2001 From: Natsumi <11171153+Natsumi-sama@users.noreply.github.com> Date: Wed, 10 May 2023 17:00:01 +1200 Subject: [PATCH] Load GPUFix and LaunchDebug from config (#542) * Load GPUFix and LaunchDebug from config * Fix GPUFix and LaunchDebug being set to false if not in config --------- Co-authored-by: Nekromateion <43814053+Nekromateion@users.noreply.github.com> --- Program.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Program.cs b/Program.cs index ba6f2a33..0e808143 100644 --- a/Program.cs +++ b/Program.cs @@ -81,6 +81,7 @@ namespace VRCX ProcessMonitor.Instance.Init(); SQLite.Instance.Init(); VRCXStorage.Load(); + LoadFromConfig(); CpuMonitor.Instance.Init(); Discord.Instance.Init(); WebApi.Instance.Init(); @@ -105,5 +106,11 @@ namespace VRCX SQLite.Instance.Exit(); ProcessMonitor.Instance.Exit(); } + + private static void LoadFromConfig() + { + if (!GPUFix) GPUFix = VRCXStorage.Instance.Get("GPU_Fix") == "true"; + if (!LaunchDebug) LaunchDebug = VRCXStorage.Instance.Get("Launch_Debug") == "true"; + } } } \ No newline at end of file