From 62dbc7f3dafd4d2738049595e920bb8340b7e0d2 Mon Sep 17 00:00:00 2001 From: Nick Blakely Date: Wed, 9 Nov 2022 18:53:06 -0800 Subject: [PATCH] Remove borderless option (windowed is now borderless); let renderer specify whether it supports fullscreen. --- Giants.Launcher/Forms/OptionsForm.cs | 18 +++--------------- Giants.Launcher/GameSettings.cs | 1 - Giants.Launcher/RegistryKeys.cs | 1 - Giants.Launcher/WindowType.cs | 1 - 4 files changed, 3 insertions(+), 18 deletions(-) diff --git a/Giants.Launcher/Forms/OptionsForm.cs b/Giants.Launcher/Forms/OptionsForm.cs index a884e82..ccad733 100644 --- a/Giants.Launcher/Forms/OptionsForm.cs +++ b/Giants.Launcher/Forms/OptionsForm.cs @@ -237,17 +237,7 @@ namespace Giants.Launcher private void cmbRenderer_SelectedIndexChanged(object sender, EventArgs e) { - bool windowed = GameSettings.Get(RegistryKeys.Windowed) == 1; - if (windowed) - { - bool borderless = GameSettings.Get(RegistryKeys.BorderlessWindow) == 1; - if (borderless) - this.cmbMode.SelectedIndex = 2; - else - this.cmbMode.SelectedIndex = 1; - } - else - this.cmbMode.SelectedIndex = 0; + this.cmbMode.SelectedIndex = GameSettings.Get(RegistryKeys.Windowed) == 1 ? 1 : 0; var renderer = (RendererInfo)this.cmbRenderer.SelectedItem; @@ -294,10 +284,8 @@ namespace Giants.Launcher GameSettings.Modify(RegistryKeys.Antialiasing, this.cmbAntialiasing.SelectedValue); GameSettings.Modify(RegistryKeys.AnisotropicFiltering, this.cmbAnisotropy.SelectedValue); - bool windowed = (WindowType)this.cmbMode.SelectedIndex == WindowType.Windowed || (WindowType)this.cmbMode.SelectedIndex == WindowType.Borderless; - GameSettings.Modify(RegistryKeys.Windowed, windowed == true ? 1 : 0); - bool borderless = (WindowType)this.cmbMode.SelectedIndex == WindowType.Borderless; - GameSettings.Modify(RegistryKeys.BorderlessWindow, borderless == true ? 1 : 0); + bool windowed = (WindowType)this.cmbMode.SelectedIndex == WindowType.Windowed; + GameSettings.Modify(RegistryKeys.Windowed, windowed == true ? 1 : 0); GameSettings.Modify(RegistryKeys.VerticalSync, this.chkVSync.Checked == true ? 1 : 0); GameSettings.Modify(RegistryKeys.TripleBuffering, this.chkTripleBuffering.Checked == true ? 1 : 0); GameSettings.Modify(RegistryKeys.NoAutoUpdate, this.chkUpdates.Checked == false ? 1 : 0); diff --git a/Giants.Launcher/GameSettings.cs b/Giants.Launcher/GameSettings.cs index 7dc8448..ade2bcf 100644 --- a/Giants.Launcher/GameSettings.cs +++ b/Giants.Launcher/GameSettings.cs @@ -95,7 +95,6 @@ namespace Giants.Launcher Settings[RegistryKeys.VideoHeight] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.VideoHeight, Settings[RegistryKeys.VideoHeight], typeof(int)); Settings[RegistryKeys.VideoDepth] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.VideoDepth, Settings[RegistryKeys.VideoDepth], typeof(int)); Settings[RegistryKeys.Windowed] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.Windowed, Settings[RegistryKeys.Windowed], typeof(int)); - Settings[RegistryKeys.BorderlessWindow] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.BorderlessWindow, Settings[RegistryKeys.BorderlessWindow], typeof(int)); Settings[RegistryKeys.VerticalSync] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.VerticalSync, Settings[RegistryKeys.VerticalSync], typeof(int)); Settings[RegistryKeys.TripleBuffering] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.TripleBuffering, Settings[RegistryKeys.TripleBuffering], typeof(int)); Settings[RegistryKeys.NoAutoUpdate] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.NoAutoUpdate, Settings[RegistryKeys.NoAutoUpdate], typeof(int)); diff --git a/Giants.Launcher/RegistryKeys.cs b/Giants.Launcher/RegistryKeys.cs index fb563ea..f1ed4fb 100644 --- a/Giants.Launcher/RegistryKeys.cs +++ b/Giants.Launcher/RegistryKeys.cs @@ -4,7 +4,6 @@ { public const string Antialiasing = "Antialiasing"; public const string AnisotropicFiltering = "AnisotropicFiltering"; - public const string BorderlessWindow = "BorderlessWindow"; public const string GameOptionsVersion = "GameOptionsVersion"; public const string NoAutoUpdate = "NoAutoUpdate"; public const string Renderer = "Renderer"; diff --git a/Giants.Launcher/WindowType.cs b/Giants.Launcher/WindowType.cs index 214e685..9ae700b 100644 --- a/Giants.Launcher/WindowType.cs +++ b/Giants.Launcher/WindowType.cs @@ -4,6 +4,5 @@ { Fullscreen = 0, Windowed = 1, - Borderless = 2, } }