1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 01:35:06 +01:00

Postpone update check until the context gets fully initialised

This commit is contained in:
Michał Janiszewski
2020-08-03 23:04:40 +02:00
committed by Aaron van Geffen
parent 6ae5645686
commit ddee3c0e46

View File

@@ -476,17 +476,6 @@ namespace OpenRCT2
_titleScreen = std::make_unique<TitleScreen>(*_gameState);
_uiContext->Initialise();
if (!_versionCheckFuture.valid())
{
_versionCheckFuture = std::async(std::launch::async, [this] {
_newVersionInfo = get_latest_version();
if (!String::StartsWith(gVersionInfoTag, _newVersionInfo.tag))
{
_hasNewVersionInfo = true;
}
});
}
return true;
}
@@ -743,6 +732,17 @@ namespace OpenRCT2
*/
void Launch()
{
if (!_versionCheckFuture.valid())
{
_versionCheckFuture = std::async(std::launch::async, [this] {
_newVersionInfo = get_latest_version();
if (!String::StartsWith(gVersionInfoTag, _newVersionInfo.tag))
{
_hasNewVersionInfo = true;
}
});
}
gIntroState = IntroState::None;
if (gOpenRCT2Headless)
{