From 3ca0fcf45715f3dc269aec80e78064500b6603a8 Mon Sep 17 00:00:00 2001 From: Bitl Date: Thu, 26 Mar 2020 09:14:09 -0700 Subject: [PATCH] more oops --- NovetusLauncher/NovetusFuncs/LauncherFuncs.cs | 56 ++++++++++--------- .../NovetusLauncher/MainForm.Designer.cs | 14 ++--- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs b/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs index 91d2f40..65bd960 100644 --- a/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs +++ b/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs @@ -499,7 +499,7 @@ public class LauncherFuncs ReloadLoadtextValue(); } - public static void ReShadeValues(string cfgpath, bool write) + public static void ReShadeValues(string cfgpath, bool write, bool setglobals) { if (write) { @@ -546,31 +546,34 @@ public class LauncherFuncs ini.IniWriteValue(section, "PerformanceMode", PerformanceMode.ToString()); } - if (Convert.ToInt32(Decryptline1) == 0) + if (setglobals) { - GlobalVars.ReShade = true; - } - else if (Convert.ToInt32(Decryptline1) == 1) - { - GlobalVars.ReShade = false; - } + if (Convert.ToInt32(Decryptline1) == 0) + { + GlobalVars.ReShade = true; + } + else if (Convert.ToInt32(Decryptline1) == 1) + { + GlobalVars.ReShade = false; + } - if (Convert.ToInt32(Decryptline2) == 1 && Convert.ToInt32(Decryptline3) == 1) - { - GlobalVars.ReShadeFPSDisplay = true; - } - else if (Convert.ToInt32(Decryptline2) == 0 && Convert.ToInt32(Decryptline3) == 0) - { - GlobalVars.ReShadeFPSDisplay = false; - } + if (Convert.ToInt32(Decryptline2) == 1 && Convert.ToInt32(Decryptline3) == 1) + { + GlobalVars.ReShadeFPSDisplay = true; + } + else if (Convert.ToInt32(Decryptline2) == 0 && Convert.ToInt32(Decryptline3) == 0) + { + GlobalVars.ReShadeFPSDisplay = false; + } - if (Convert.ToInt32(Decryptline4) == 1) - { - GlobalVars.ReShadePerformanceMode = true; - } - else if (Convert.ToInt32(Decryptline4) == 0) - { - GlobalVars.ReShadePerformanceMode = false; + if (Convert.ToInt32(Decryptline4) == 1) + { + GlobalVars.ReShadePerformanceMode = true; + } + else if (Convert.ToInt32(Decryptline4) == 0) + { + GlobalVars.ReShadePerformanceMode = false; + } } } } @@ -582,11 +585,11 @@ public class LauncherFuncs if (!File.Exists(fullpath)) { File.Copy(GlobalVars.ConfigDir + "\\ReShade_default.ini", fullpath, true); - ReShadeValues(fullpath, write); + ReShadeValues(fullpath, write, true); } else { - ReShadeValues(fullpath, write); + ReShadeValues(fullpath, write, true); } string clientdir = GlobalVars.ClientDir; @@ -599,10 +602,11 @@ public class LauncherFuncs if (!File.Exists(fulldirpath)) { File.Copy(fullpath, fulldirpath, true); + ReShadeValues(fulldirpath, write, false); } else { - ReShadeValues(fulldirpath, write); + ReShadeValues(fulldirpath, write, false); } } } diff --git a/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs b/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs index a89c237..bc49b5b 100644 --- a/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs +++ b/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs @@ -540,7 +540,7 @@ namespace NovetusLauncher // label24 // this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(385, 14); + this.label24.Location = new System.Drawing.Point(365, 7); this.label24.Name = "label24"; this.label24.Size = new System.Drawing.Size(60, 13); this.label24.TabIndex = 52; @@ -549,7 +549,7 @@ namespace NovetusLauncher // label23 // this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(220, 14); + this.label23.Location = new System.Drawing.Point(200, 7); this.label23.Name = "label23"; this.label23.Size = new System.Drawing.Size(92, 13); this.label23.TabIndex = 51; @@ -573,7 +573,7 @@ namespace NovetusLauncher // // button7 // - this.button7.Location = new System.Drawing.Point(415, 56); + this.button7.Location = new System.Drawing.Point(395, 49); this.button7.Name = "button7"; this.button7.Size = new System.Drawing.Size(51, 21); this.button7.TabIndex = 48; @@ -583,7 +583,7 @@ namespace NovetusLauncher // // button11 // - this.button11.Location = new System.Drawing.Point(364, 56); + this.button11.Location = new System.Drawing.Point(344, 49); this.button11.Name = "button11"; this.button11.Size = new System.Drawing.Size(45, 21); this.button11.TabIndex = 46; @@ -593,7 +593,7 @@ namespace NovetusLauncher // // numericUpDown1 // - this.numericUpDown1.Location = new System.Drawing.Point(364, 30); + this.numericUpDown1.Location = new System.Drawing.Point(344, 23); this.numericUpDown1.Maximum = new decimal(new int[] { 65535, 0, @@ -626,7 +626,7 @@ namespace NovetusLauncher // // button10 // - this.button10.Location = new System.Drawing.Point(203, 56); + this.button10.Location = new System.Drawing.Point(183, 49); this.button10.Name = "button10"; this.button10.Size = new System.Drawing.Size(120, 21); this.button10.TabIndex = 15; @@ -657,7 +657,7 @@ namespace NovetusLauncher // // textBox1 // - this.textBox1.Location = new System.Drawing.Point(169, 30); + this.textBox1.Location = new System.Drawing.Point(149, 23); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(189, 20); this.textBox1.TabIndex = 0;