From a118fa6c71d0e8519f1c211a9432d5ce50a1d62b Mon Sep 17 00:00:00 2001 From: Anonymous275 <36374260+Anonymous-275@users.noreply.github.com> Date: Sun, 25 Sep 2022 15:38:27 +0300 Subject: [PATCH] hard code UI disable --- include/Launcher.h | 2 +- src/Config.cpp | 6 ++++-- src/gui/Gui.cpp | 17 ++++++++++------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/include/Launcher.h b/include/Launcher.h index 32c2eff..038da5a 100644 --- a/include/Launcher.h +++ b/include/Launcher.h @@ -63,7 +63,7 @@ class Launcher { public: // variables static inline std::thread EntryThread{}; - static inline VersionParser SupportedVersion{"0.26.0.0"}; + static inline VersionParser SupportedVersion{"0.26.1.0"}; static inline std::string Version{"2.0"}; static inline std::string FullVersion{Version + ".99"}; diff --git a/src/Config.cpp b/src/Config.cpp index b343d38..acf9e49 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -15,9 +15,11 @@ void Launcher::LoadConfig() { auto GamePath = config["GamePath"]; auto ProfilePath = config["ProfilePath"]; auto CachePath = config["CachePath"]; - if (ui.is_boolean()) { + + EnableUI = false; + /*if (ui.is_boolean()) { EnableUI = ui.as_boolean()->get(); - } else LOG(ERROR) << "Failed to get 'UI' boolean from config"; + } else LOG(ERROR) << "Failed to get 'UI' boolean from config";*/ // Default -1 / Release 1 / EA 2 / Dev 3 / Custom 3 if (build.is_string()) { diff --git a/src/gui/Gui.cpp b/src/gui/Gui.cpp index d95d221..771ea04 100644 --- a/src/gui/Gui.cpp +++ b/src/gui/Gui.cpp @@ -293,27 +293,30 @@ void LoadConfig() { UIData::CachePath = CachePath.as_string()->get(); } else wxMessageBox("Cache path not found!", "Error"); - if (Console.is_boolean()) { + UIData::Console = true; + /*if (Console.is_boolean()) { UIData::Console = Console.as_boolean()->get(); - } else wxMessageBox("Unable to retrieve console state!", "Error"); + } else wxMessageBox("Unable to retrieve console state!", "Error");*/ if (Build.is_string()) { UIData::Build = Build.as_string()->get(); } else wxMessageBox("Unable to retrieve build state!", "Error"); - if (UI.is_boolean()) { + + UIData::UI = false; + /*if (UI.is_boolean()) { UIData::UI = UI.as_boolean()->get(); - } else wxMessageBox("Unable to retrieve UI state!", "Error"); + } else wxMessageBox("Unable to retrieve UI state!", "Error");*/ } else { std::ofstream tml(UIData::ConfigPath); if (tml.is_open()) { - tml << "UI = true\n" + tml << //"UI = true\n" "Build = 'Default'\n" "GamePath = ''\n" "ProfilePath = ''\n" - "CachePath = ''\n" - "Console = false"; + "CachePath = ''"; + //"Console = false"; tml.close(); AutoDetectGame(); AutoDetectProfile();