From 6a99c1bd5c3efa36ab945239716f1a98903c23c8 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 14 Apr 2024 14:21:03 +0200 Subject: [PATCH] Launcher: untoggle windowed mode by default and rename field Untoggled by default due to popular demand (most wanted to launch full screen). Also renamed maxFPS field to fpsMax to remain consistency with the actual cvar name. --- r5dev/sdklauncher/basepanel.cpp | 5 ++--- r5dev/sdklauncher/sdklauncher_const.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/r5dev/sdklauncher/basepanel.cpp b/r5dev/sdklauncher/basepanel.cpp index e99abdcd..dae046c5 100644 --- a/r5dev/sdklauncher/basepanel.cpp +++ b/r5dev/sdklauncher/basepanel.cpp @@ -382,7 +382,6 @@ void CSurface::Init() this->m_WindowedToggle->SetSize({ 105, 18 }); this->m_WindowedToggle->SetLocation({ 15, 7 }); this->m_WindowedToggle->SetTabIndex(0); - this->m_WindowedToggle->SetChecked(true); this->m_WindowedToggle->SetText("Windowed"); this->m_WindowedToggle->SetAnchor(Forms::AnchorStyles::Top | Forms::AnchorStyles::Left); this->m_EngineVideoGroup->AddControl(this->m_WindowedToggle); @@ -578,7 +577,7 @@ void CSurface::LoadSettings() // Video. this->m_WindowedToggle->SetChecked(sv->GetBool("windowed")); this->m_NoBorderToggle->SetChecked(sv->GetBool("borderless")); - this->m_FpsTextBox->SetText(sv->GetString("maxFPS", "-1")); + this->m_FpsTextBox->SetText(sv->GetString("fpsMax", "-1")); this->m_WidthTextBox->SetText(sv->GetString("width")); this->m_HeightTextBox->SetText(sv->GetString("height")); } @@ -639,7 +638,7 @@ void CSurface::SaveSettings() // Video. sv->SetBool("windowed", this->m_WindowedToggle->Checked()); sv->SetBool("borderless", this->m_NoBorderToggle->Checked()); - sv->SetString("maxFPS", GetControlValue(this->m_FpsTextBox)); + sv->SetString("fpsMax", GetControlValue(this->m_FpsTextBox)); sv->SetString("width", GetControlValue(this->m_WidthTextBox)); sv->SetString("height", GetControlValue(this->m_HeightTextBox)); diff --git a/r5dev/sdklauncher/sdklauncher_const.h b/r5dev/sdklauncher/sdklauncher_const.h index 0df95c77..508734d9 100644 --- a/r5dev/sdklauncher/sdklauncher_const.h +++ b/r5dev/sdklauncher/sdklauncher_const.h @@ -1,7 +1,7 @@ #pragma once // Change this each time the settings format has changed. -#define SDK_LAUNCHER_VERSION 2 +#define SDK_LAUNCHER_VERSION 3 // Uncomment this line to compile the launcher for dedicated server builds. //#define DEDI_LAUNCHER