diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index bb472b41c6..a7284654be 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -484,6 +484,7 @@ void LogoScreen::update() { Next(); } frames_++; + sinceStart_ = (double)frames_ / rate; } void LogoScreen::sendMessage(const char *message, const char *value) { @@ -521,10 +522,7 @@ void LogoScreen::render() { dc.Begin(); - double rate = std::max(30.0, (double)System_GetPropertyFloat(SYSPROP_DISPLAY_REFRESH_RATE)); - double sinceStart = (double)frames_ / rate; - - float t = (float)sinceStart / (logoScreenSeconds / 3.0f); + float t = (float)sinceStart_ / (logoScreenSeconds / 3.0f); float alpha = t; if (t > 1.0f) diff --git a/UI/MiscScreens.h b/UI/MiscScreens.h index c360d0e4d1..0cbd38ff0f 100644 --- a/UI/MiscScreens.h +++ b/UI/MiscScreens.h @@ -137,6 +137,7 @@ public: private: void Next(); int frames_ = 0; + double sinceStart_ = 0.0; bool switched_ = false; bool gotoGameSettings_ = false; };