From 3c076ddb6f0b1d6489228f16c8e633e108bd0905 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 4 Jun 2021 14:33:31 +0200 Subject: [PATCH] Opening unsupported trace gives option to download update. --- server/TracyBadVersion.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/TracyBadVersion.cpp b/server/TracyBadVersion.cpp index 806e47b4..0c3b196a 100644 --- a/server/TracyBadVersion.cpp +++ b/server/TracyBadVersion.cpp @@ -3,6 +3,7 @@ #include "IconsFontAwesome5.h" #include "TracyBadVersion.hpp" #include "TracyImGui.hpp" +#include "TracyWeb.hpp" namespace tracy { @@ -61,7 +62,14 @@ void BadVersionImpl( BadVersionState& badVer ) TextCentered( ICON_FA_CLOUD_DOWNLOAD_ALT ); ImGui::Text( "The file you are trying to open is unsupported.\nYou should update to tracy %i.%i.%i or newer and try again.", badVer.version >> 16, ( badVer.version >> 8 ) & 0xFF, badVer.version & 0xFF ); ImGui::Separator(); - if( ImGui::Button( "I understand" ) ) + if( ImGui::Button( ICON_FA_DOWNLOAD " Download update" ) ) + { + tracy::OpenWebpage( "https://github.com/wolfpld/tracy/releases" ); + ImGui::CloseCurrentPopup(); + badVer.state = BadVersionState::Ok; + } + ImGui::SameLine(); + if( ImGui::Button( "Maybe later" ) ) { ImGui::CloseCurrentPopup(); badVer.state = BadVersionState::Ok;