1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-05 06:45:37 +01:00

Remove borderless option (windowed is now borderless); let renderer specify whether it supports fullscreen.

This commit is contained in:
Nick Blakely 2022-11-09 18:53:06 -08:00
parent 709fe37557
commit 62dbc7f3da
4 changed files with 3 additions and 18 deletions

View File

@ -237,17 +237,7 @@ namespace Giants.Launcher
private void cmbRenderer_SelectedIndexChanged(object sender, EventArgs e)
{
bool windowed = GameSettings.Get<int>(RegistryKeys.Windowed) == 1;
if (windowed)
{
bool borderless = GameSettings.Get<int>(RegistryKeys.BorderlessWindow) == 1;
if (borderless)
this.cmbMode.SelectedIndex = 2;
else
this.cmbMode.SelectedIndex = 1;
}
else
this.cmbMode.SelectedIndex = 0;
this.cmbMode.SelectedIndex = GameSettings.Get<int>(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);

View File

@ -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));

View File

@ -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";

View File

@ -4,6 +4,5 @@
{
Fullscreen = 0,
Windowed = 1,
Borderless = 2,
}
}