GhosteShop -> Darkstore Part 1

This commit is contained in:
dark98
2021-06-07 01:12:36 +01:00
parent 789891cbc8
commit e88b82bf05
43 changed files with 322 additions and 370 deletions
+5 -5
View File
@@ -92,7 +92,7 @@ void Config::sysLang() {
Au cas où ça nexiste pas.
*/
void Config::initialize() {
FILE *temp = fopen("sdmc:/3ds/GhosteShop/Config.json", "w");
FILE *temp = fopen("sdmc:/3ds/DarkStore/Config.json", "w");
char tmp[2] = { '{', '}' };
fwrite(tmp, sizeof(tmp), 1, temp);
fclose(temp);
@@ -102,11 +102,11 @@ void Config::initialize() {
Constructeur de la configuration.
*/
Config::Config() {
if (access("sdmc:/3ds/GhosteShop/Config.json", F_OK) != 0) {
if (access("sdmc:/3ds/DarkStore/Config.json", F_OK) != 0) {
this->initialize();
}
FILE *file = fopen("sdmc:/3ds/GhosteShop/Config.json", "r");
FILE *file = fopen("sdmc:/3ds/DarkStore/Config.json", "r");
this->json = nlohmann::json::parse(file, nullptr, false);
fclose(file);
@@ -135,7 +135,7 @@ Config::Config() {
/* Ecrivez à config si changesMade. */
void Config::save() {
if (this->changesMade) {
FILE *file = fopen("sdmc:/3ds/GhosteShop/Config.json", "w");
FILE *file = fopen("sdmc:/3ds/DarkStore/Config.json", "w");
/* Valeurs Théoriques. */
this->setString("Language", this->language());
@@ -180,4 +180,4 @@ std::string Config::getString(const std::string &key) {
return this->json.at(key).get_ref<const std::string &>();
}
void Config::setString(const std::string &key, const std::string &v) { this->json[key] = v; };
void Config::setString(const std::string &key, const std::string &v) { this->json[key] = v; };