mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Handle FileReadError.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user