Universal-Updater -> DarkStore Part 1

This commit is contained in:
dark98
2021-09-05 17:11:31 +01:00
parent becaeb4631
commit 68937d91dd
95 changed files with 377 additions and 397 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
/*
* This file is part of Universal-Updater
* This file is part of DarkStore
* Copyright (C) 2019-2021 Universal-Team
*
* This program is free software: you can redistribute it and/or modify
@@ -96,7 +96,7 @@ void Config::sysLang() {
In case it doesn't exist.
*/
void Config::initialize() {
FILE *temp = fopen("sdmc:/3ds/Universal-Updater/Config.json", "w");
FILE *temp = fopen("sdmc:/3ds/DarkStore/Config.json", "w");
char tmp[2] = { '{', '}' };
fwrite(tmp, sizeof(tmp), 1, temp);
fclose(temp);
@@ -106,11 +106,11 @@ void Config::initialize() {
Constructor of the config.
*/
Config::Config() {
if (access("sdmc:/3ds/Universal-Updater/Config.json", F_OK) != 0) {
if (access("sdmc:/3ds/DarkStore/Config.json", F_OK) != 0) {
this->initialize();
}
FILE *file = fopen("sdmc:/3ds/Universal-Updater/Config.json", "rt");
FILE *file = fopen("sdmc:/3ds/DarkStore/Config.json", "rt");
if (file) {
this->json = nlohmann::json::parse(file, nullptr, false);
fclose(file);
@@ -158,7 +158,7 @@ Config::Config() {
/* Write to config if changesMade. */
void Config::save() {
if (this->changesMade) {
FILE *file = fopen("sdmc:/3ds/Universal-Updater/Config.json", "w");
FILE *file = fopen("sdmc:/3ds/DarkStore/Config.json", "w");
/* Set values. */
this->setString("Language", this->language());