mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Add lost connection popup.
This commit is contained in:
parent
d98fbd60e5
commit
53eacd3dc2
@ -131,6 +131,7 @@ View::View( void(*cbMainThread)(std::function<void()>), const char* addr, uint16
|
|||||||
, m_frames( nullptr )
|
, m_frames( nullptr )
|
||||||
, m_messagesScrollBottom( true )
|
, m_messagesScrollBottom( true )
|
||||||
, m_reactToCrash( true )
|
, m_reactToCrash( true )
|
||||||
|
, m_reactToLostConnection( true )
|
||||||
, m_smallFont( smallFont )
|
, m_smallFont( smallFont )
|
||||||
, m_bigFont( bigFont )
|
, m_bigFont( bigFont )
|
||||||
, m_stcb( stcb )
|
, m_stcb( stcb )
|
||||||
@ -1121,6 +1122,27 @@ bool View::DrawImpl()
|
|||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( m_reactToLostConnection && !m_worker.IsConnected() )
|
||||||
|
{
|
||||||
|
m_reactToLostConnection = false;
|
||||||
|
if( m_worker.GetSendInFlight() > 0 )
|
||||||
|
{
|
||||||
|
ImGui::OpenPopup( "Connection lost!" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( ImGui::BeginPopupModal( "Connection lost!", nullptr, ImGuiWindowFlags_AlwaysAutoResize ) )
|
||||||
|
{
|
||||||
|
TextCentered( ICON_FA_PLUG );
|
||||||
|
ImGui::TextUnformatted(
|
||||||
|
"Connection to the profiled application was lost\n"
|
||||||
|
"before all required profiling data could be retrieved.\n"
|
||||||
|
"This will result in missing source locations,\n"
|
||||||
|
"unresolved stack frames, etc." );
|
||||||
|
ImGui::Separator();
|
||||||
|
if( ImGui::Button( "Dismiss" ) ) ImGui::CloseCurrentPopup();
|
||||||
|
ImGui::EndPopup();
|
||||||
|
}
|
||||||
|
|
||||||
return keepOpen;
|
return keepOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -365,6 +365,7 @@ private:
|
|||||||
DecayValue<uint64_t> m_drawThreadHighlight = 0;
|
DecayValue<uint64_t> m_drawThreadHighlight = 0;
|
||||||
Annotation* m_selectedAnnotation = nullptr;
|
Annotation* m_selectedAnnotation = nullptr;
|
||||||
bool m_reactToCrash = false;
|
bool m_reactToCrash = false;
|
||||||
|
bool m_reactToLostConnection = false;
|
||||||
|
|
||||||
ImGuiTextFilter m_statisticsFilter;
|
ImGuiTextFilter m_statisticsFilter;
|
||||||
ImGuiTextFilter m_statisticsImageFilter;
|
ImGuiTextFilter m_statisticsImageFilter;
|
||||||
|
Loading…
Reference in New Issue
Block a user