hard code UI disable

This commit is contained in:
Anonymous275 2022-09-25 15:38:27 +03:00
parent 8ad92ad503
commit a118fa6c71
3 changed files with 15 additions and 10 deletions

View File

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

View File

@ -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()) {

View File

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