Fully rewrite config.

This commit is contained in:
StackZ
2020-06-20 15:22:50 +02:00
parent 7972fd483a
commit 50e4aa99e0
22 changed files with 1372 additions and 1274 deletions
+4 -3
View File
@@ -24,12 +24,13 @@
* reasonable ways as different from the original version.
*/
#include "config.hpp"
#include "logging.hpp"
#include "utils/config.hpp"
#include <memory>
extern std::unique_ptr<Config> config;
std::string Logging::format(const std::string& fmt_str, ...) {
va_list ap;
char* fp = NULL;
@@ -57,7 +58,7 @@ void Logging::createLogFile(void) {
// Only write to the Log, if it is enabled in the Settings File!
void Logging::writeToLog(std::string debugText) {
if (Config::getBool("LOGGING")) {
if (config->logging()) {
std::ofstream logFile;
logFile.open(("sdmc:/3ds/Universal-Updater/Log.log"), std::ofstream::app);
std::string writeDebug = "[ ";