mirror of
https://github.com/Team-Neptune/DeepSea-Toolbox.git
synced 2024-11-23 12:29:51 +00:00
Relax config.json parsing restrictions
Sysmodules menu no longer fails if it can't parse the file
This commit is contained in:
parent
0356c59574
commit
2916c61ec6
@ -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;
|
||||
try {
|
||||
configFile >> configJson;
|
||||
} catch(json::parse_error& e) {
|
||||
return;
|
||||
|
||||
if (!configFile.fail()) {
|
||||
try {
|
||||
configFile >> configJson;
|
||||
} catch(json::parse_error& e) {}
|
||||
}
|
||||
|
||||
DIR *contents_dir = opendir(CONTENTS_PATH);
|
||||
|
Loading…
Reference in New Issue
Block a user