1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Handle FileReadError.

This commit is contained in:
Bartosz Taudul
2020-02-12 19:53:37 +01:00
parent eb79507501
commit 1492536bdb
5 changed files with 31 additions and 0 deletions
+17
View File
@@ -19,6 +19,9 @@ void BadVersionImpl( BadVersionState& badVer )
case BadVersionState::BadFile:
ImGui::OpenPopup( "Bad file" );
break;
case BadVersionState::ReadError:
ImGui::OpenPopup( "File read error" );
break;
case BadVersionState::UnsupportedVersion:
ImGui::OpenPopup( "Unsupported file version" );
break;
@@ -43,6 +46,20 @@ void BadVersionImpl( BadVersionState& badVer )
}
ImGui::EndPopup();
}
if( ImGui::BeginPopupModal( "File read error", nullptr, ImGuiWindowFlags_AlwaysAutoResize ) )
{
#ifdef TRACY_EXTENDED_FONT
TextCentered( ICON_FA_EXCLAMATION_TRIANGLE );
#endif
ImGui::Text( "The file you are trying to open cannot be mapped to memory." );
ImGui::Separator();
if( ImGui::Button( "OK" ) )
{
ImGui::CloseCurrentPopup();
badVer.state = BadVersionState::Ok;
}
ImGui::EndPopup();
}
if( ImGui::BeginPopupModal( "Unsupported file version", nullptr, ImGuiWindowFlags_AlwaysAutoResize ) )
{
#ifdef TRACY_EXTENDED_FONT