diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompactSettings.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompactSettings.cs index bf55b86..5f3f2c5 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompactSettings.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompactSettings.cs @@ -113,6 +113,23 @@ namespace NovetusLauncher GlobalVars.UserConfiguration.QualityLevel = Settings.GraphicsOptions.Level.Automatic; break; } + + if (comboBox2.SelectedIndex != 6) + { + //https://stackoverflow.com/questions/9029351/close-all-open-forms-except-the-main-menu-in-c-sharp + + FormCollection fc = Application.OpenForms; + + foreach (Form frm in fc) + { + //iterate through + if (frm.Name == "CustomGraphicsOptions") + { + frm.Close(); + break; + } + } + } } private void NovetusSettings_Load(object sender, EventArgs e) diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs index 25b6392..fdd9c17 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs @@ -1336,6 +1336,23 @@ namespace NovetusLauncher } GlobalFuncs.ReadClientValues(richTextBox1); + + if (comboBox2.SelectedIndex != 6) + { + //https://stackoverflow.com/questions/9029351/close-all-open-forms-except-the-main-menu-in-c-sharp + + FormCollection fc = Application.OpenForms; + + foreach (Form frm in fc) + { + //iterate through + if (frm.Name == "CustomGraphicsOptions") + { + frm.Close(); + break; + } + } + } } private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)