From ddee3c0e4624e07588f549a10b779f8c738d98fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 3 Aug 2020 23:04:40 +0200 Subject: [PATCH] Postpone update check until the context gets fully initialised --- src/openrct2/Context.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 7b0d5f4829..edcb7f89d0 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -476,17 +476,6 @@ namespace OpenRCT2 _titleScreen = std::make_unique(*_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) {