mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-02 16:49:05 +00:00
Don't show those notes with the json stuff and get rid of pase.cpp/.hpp Part 1/3.
This commit is contained in:
@@ -94,7 +94,7 @@ RSF_FILE := app/build-cia.rsf
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
|
||||
|
||||
CFLAGS := -g -Wall -O2 -mword-relocations \
|
||||
CFLAGS := -g -Wall -Wno-psabi -O2 -mword-relocations \
|
||||
-DVERSION_STRING=\"$(GIT_VER)\" \
|
||||
-fomit-frame-pointer -ffunction-sections \
|
||||
$(ARCH)
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "screens/scriptlist.hpp"
|
||||
|
||||
#include "utils/config.hpp"
|
||||
#include "utils/parse.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
@@ -53,6 +52,16 @@ std::string selectedTitle;
|
||||
std::string Desc = "";
|
||||
nlohmann::json jsonFile;
|
||||
|
||||
std::string get(nlohmann::json json, const std::string &key, const std::string &key2) {
|
||||
if(!json.contains(key)) return "MISSING: " + key;
|
||||
if(!json.at(key).is_object()) return "NOT OBJECT: " + key;
|
||||
|
||||
if(!json.at(key).contains(key2)) return "MISSING: " + key + "." + key2;
|
||||
if(!json.at(key).at(key2).is_string()) return "NOT STRING: " + key + "." + key2;
|
||||
|
||||
return json.at(key).at(key2).get_ref<const std::string&>();
|
||||
}
|
||||
|
||||
Info parseInfo(std::string fileName) {
|
||||
FILE* file = fopen(fileName.c_str(), "rt");
|
||||
if(!file) {
|
||||
|
||||
Reference in New Issue
Block a user