mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
'Update available' button should lead to openrct2.io
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
0.4.23 (in development)
|
||||
------------------------------------------------------------------------
|
||||
- Improved: [#24368] Clicking the in-game update notication now leads to a more user-friendly download page.
|
||||
|
||||
0.4.22 (2025-05-04)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
case WIDX_OPEN_URL:
|
||||
if (_newVersionInfo != nullptr)
|
||||
{
|
||||
GetContext()->GetUiContext()->OpenURL(_newVersionInfo->url);
|
||||
GetContext()->GetUiContext()->OpenURL("https://openrct2.io/download/release");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -70,7 +70,7 @@ NewVersionInfo GetLatestVersion()
|
||||
// If the check doesn't succeed, provide current version so we don't bother user
|
||||
// with invalid data.
|
||||
std::string tag = gVersionInfoTag;
|
||||
NewVersionInfo verinfo{ tag, "", "", "" };
|
||||
NewVersionInfo verinfo{ tag, "", "" };
|
||||
#if !defined(DISABLE_HTTP) && !defined(DISABLE_VERSION_CHECKER)
|
||||
auto now = std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count();
|
||||
auto then = Config::Get().general.LastVersionCheckTime;
|
||||
@@ -100,7 +100,6 @@ NewVersionInfo GetLatestVersion()
|
||||
verinfo.tag = Json::GetString(root["tag_name"]);
|
||||
verinfo.name = Json::GetString(root["name"]);
|
||||
verinfo.changelog = Json::GetString(root["body"]);
|
||||
verinfo.url = Json::GetString(root["html_url"]);
|
||||
|
||||
Config::Get().general.LastVersionCheckTime = now;
|
||||
Config::Save();
|
||||
|
||||
@@ -83,7 +83,6 @@ struct NewVersionInfo
|
||||
std::string tag;
|
||||
std::string name;
|
||||
std::string changelog;
|
||||
std::string url;
|
||||
};
|
||||
|
||||
NewVersionInfo GetLatestVersion();
|
||||
|
||||
Reference in New Issue
Block a user