From 5615e7f4df2ae04cdcf3b0f178cdf22584221665 Mon Sep 17 00:00:00 2001 From: Sam39 Date: Mon, 25 Jul 2022 11:58:07 +0300 Subject: [PATCH] [Fixed] Config file changed to "toml" --- src/Config.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Config.cpp b/src/Config.cpp index 2b72dfa..b3e4c14 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -9,8 +9,8 @@ #include "Logger.h" void Launcher::LoadConfig() { - if(fs::exists("Launcher.cfg")) { - toml::parse_result config = toml::parse_file("Launcher.cfg"); + if(fs::exists("Launcher.toml")) { + toml::parse_result config = toml::parse_file("Launcher.toml"); auto ui = config["UI"]; auto build = config["Build"]; if(ui.is_boolean()) { @@ -24,13 +24,13 @@ void Launcher::LoadConfig() { } else LOG(ERROR) << "Failed to get 'Build' string from config"; } else { - std::ofstream cfg("Launcher.cfg"); - if(cfg.is_open()){ - cfg << + std::ofstream tml("Launcher.toml"); + if(tml.is_open()){ + tml << R"(UI = true Build = "Default" )"; - cfg.close(); + tml.close(); }else{ LOG(FATAL) << "Failed to write config on disk!"; throw ShutdownException("Fatal Error");