mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Added a version setting which can be used to detect upgrades of the application.
This commit is contained in:
parent
942e3ca5bf
commit
c8af5816a3
|
@ -475,6 +475,19 @@ int main(int argc, char* argv[])
|
||||||
Settings::getInstance()->saveFile();
|
Settings::getInstance()->saveFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if the application version has changed, which would normally mean that the
|
||||||
|
// user has upgraded to a newer release.
|
||||||
|
std::string applicationVersion;
|
||||||
|
if ((applicationVersion = Settings::getInstance()->
|
||||||
|
getString("ApplicationVersion")) != PROGRAM_VERSION_STRING) {
|
||||||
|
if (applicationVersion != "") {
|
||||||
|
LOG(LogInfo) << "Application version changed from previous startup, from \"" <<
|
||||||
|
applicationVersion << "\" to \"" << PROGRAM_VERSION_STRING << "\"";
|
||||||
|
}
|
||||||
|
Settings::getInstance()->setString("ApplicationVersion", PROGRAM_VERSION_STRING);
|
||||||
|
Settings::getInstance()->saveFile();
|
||||||
|
}
|
||||||
|
|
||||||
Window window;
|
Window window;
|
||||||
SystemScreensaver screensaver(&window);
|
SystemScreensaver screensaver(&window);
|
||||||
MediaViewer mediaViewer(&window);
|
MediaViewer mediaViewer(&window);
|
||||||
|
|
|
@ -302,6 +302,7 @@ void Settings::setDefaults()
|
||||||
// Hardcoded or program-internal settings.
|
// Hardcoded or program-internal settings.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
mStringMap["ApplicationVersion"] = { "", "" };
|
||||||
mBoolMap["DebugGrid"] = { false, false };
|
mBoolMap["DebugGrid"] = { false, false };
|
||||||
mBoolMap["DebugText"] = { false, false };
|
mBoolMap["DebugText"] = { false, false };
|
||||||
mBoolMap["DebugImage"] = { false, false };
|
mBoolMap["DebugImage"] = { false, false };
|
||||||
|
|
Loading…
Reference in a new issue