Only save config if changes are made.

This commit is contained in:
StackZ
2020-03-09 16:25:56 +01:00
parent 1a20cc50f3
commit becb99cdd3
4 changed files with 26 additions and 3 deletions
+3
View File
@@ -40,6 +40,7 @@ extern bool checkWifiStatus(void);
extern void notImplemented(void);
bool isScriptSelected = false;
extern bool changesMade;
// Parse the script for the list.
ScriptInfo parseInfo(std::string fileName) {
@@ -395,6 +396,7 @@ void ScriptList::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
std::string tempScript = selectFilePath(Lang::get("SELECT_SCRIPT_PATH"), {});
if (tempScript != "") {
Config::ScriptPath = tempScript;
changesMade = true;
}
break;
}
@@ -430,6 +432,7 @@ void ScriptList::SubMenuLogic(u32 hDown, u32 hHeld, touchPosition touch) {
std::string tempScript = selectFilePath(Lang::get("SELECT_SCRIPT_PATH"), {});
if (tempScript != "") {
Config::ScriptPath = tempScript;
changesMade = true;
}
}
}