(Android) Fixed an issue where re-running the configurator would wipe the es_settings.xml file

This commit is contained in:
Leon Styhre 2024-02-02 19:58:15 +01:00
parent 21d6a4d1eb
commit b7ff3e508b

View file

@ -578,6 +578,8 @@ int main(int argc, char* argv[])
#endif
#if defined(__ANDROID__)
bool resetTouchOverlay {false};
if (Utils::Platform::Android::checkConfigurationNeeded()) {
Utils::Platform::Android::startConfigurator();
@ -588,10 +590,7 @@ int main(int argc, char* argv[])
exit(0);
// Always enable the touch overlay after running the configurator.
if (!Settings::getInstance()->getBool("InputTouchOverlay")) {
Settings::getInstance()->setBool("InputTouchOverlay", true);
Settings::getInstance()->saveFile();
}
resetTouchOverlay = true;
}
Utils::Platform::Android::setDataDirectories();
@ -739,6 +738,13 @@ int main(int argc, char* argv[])
}
}
#if defined(__ANDROID__)
if (resetTouchOverlay) {
Settings::getInstance()->setBool("InputTouchOverlay", true);
Settings::getInstance()->saveFile();
}
#endif
{
// Check if the application release number has changed, which would normally mean that the
// user has upgraded to a new version.