diff --git a/binaries/data/config/default.cfg b/binaries/data/config/default.cfg index f7539414a6..551221bba0 100644 --- a/binaries/data/config/default.cfg +++ b/binaries/data/config/default.cfg @@ -482,7 +482,7 @@ phase = completed ; Show a chat notification if you or an ally h [gui.splashscreen] enable = true ; Enable/disable the splashscreen -version = 0 ; Splashscreen version (date of last modification). By default, 0 to force splashscreen to appear at first launch +version = 0 ; Splashscreen version (MD5 hash of file content). By default, 0 to force splashscreen to appear at first launch [gui.session.diplomacycolors] self = "21 55 149" ; Color of your units when diplomacy colors are enabled diff --git a/binaries/data/mods/public/gui/pregame/SplashscreenHandler.js b/binaries/data/mods/public/gui/pregame/SplashscreenHandler.js index 6dd27b43d7..746d5efadd 100644 --- a/binaries/data/mods/public/gui/pregame/SplashscreenHandler.js +++ b/binaries/data/mods/public/gui/pregame/SplashscreenHandler.js @@ -31,7 +31,7 @@ class SplashScreenHandler this.showSplashScreen = false; if (Engine.ConfigDB_GetValue("user", "gui.splashscreen.enable") === "true" || - Engine.ConfigDB_GetValue("user", "gui.splashscreen.version") < Engine.GetFileMTime("gui/splashscreen/splashscreen.txt")) + Engine.ConfigDB_GetValue("user", "gui.splashscreen.version") !== Engine.CalculateMD5(Engine.ReadFile("gui/splashscreen/splashscreen.txt"))) Engine.PushGuiPage("page_splashscreen.xml", {}); } } diff --git a/binaries/data/mods/public/gui/splashscreen/splashscreen.js b/binaries/data/mods/public/gui/splashscreen/splashscreen.js index aea932a850..b653e36af7 100644 --- a/binaries/data/mods/public/gui/splashscreen/splashscreen.js +++ b/binaries/data/mods/public/gui/splashscreen/splashscreen.js @@ -9,7 +9,7 @@ function init(data) function closePage() { Engine.ConfigDB_CreateValue("user", "gui.splashscreen.enable", String(Engine.GetGUIObjectByName("displaySplashScreen").checked)); - Engine.ConfigDB_CreateValue("user", "gui.splashscreen.version", Engine.GetFileMTime(g_SplashScreenFile)); + Engine.ConfigDB_CreateValue("user", "gui.splashscreen.version", Engine.CalculateMD5(Engine.ReadFile(g_SplashScreenFile))); Engine.ConfigDB_SaveChanges("user"); Engine.PopGuiPage(); }