Relax config.json parsing restrictions

Sysmodules menu no longer fails if it can't parse the file
This commit is contained in:
cathery 2020-01-07 05:49:20 +03:00
parent 0356c59574
commit 2916c61ec6

View File

@ -35,17 +35,12 @@ GuiSysmodule::GuiSysmodule() : Gui() {
anyModulesPresent = false;
std::ifstream configFile("sdmc:/switch/KosmosToolbox/config.json");
if (configFile.fail()) {
Gui::g_nextGui = GUI_MAIN;
return;
}
json configJson;
if (!configFile.fail()) {
try {
configFile >> configJson;
} catch(json::parse_error& e) {
return;
} catch(json::parse_error& e) {}
}
DIR *contents_dir = opendir(CONTENTS_PATH);