From 11e9327e0249ca4f0d021813b203b29ca3ea1720 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 18 Sep 2017 00:31:38 +0200 Subject: [PATCH] Show whether server is recording data. --- server/TracyView.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index c00e56bc..a974df4d 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -320,11 +320,16 @@ void View::DrawImpl() { sprintf( buf, "%6.2f Mbps", mbps ); } - ImGui::PlotLines( buf, m_mbps.data(), m_mbps.size(), 0, nullptr, 0, std::numeric_limits::max(), ImVec2( 160, 0 ) ); + ImGui::Dummy( ImVec2( 10, 0 ) ); + ImGui::SameLine(); + ImGui::PlotLines( buf, m_mbps.data(), m_mbps.size(), 0, nullptr, 0, std::numeric_limits::max(), ImVec2( 150, 0 ) ); } ImGui::Text( "Memory usage: %.2f MB", memUsage.load( std::memory_order_relaxed ) / ( 1024.f * 1024.f ) ); + const auto wpos = ImGui::GetWindowPos() + ImGui::GetWindowContentRegionMin(); + ImGui::GetWindowDrawList()->AddCircleFilled( wpos + ImVec2( 6, 9 ), 5.f, m_connected.load( std::memory_order_relaxed ) ? 0xFF2222CC : 0xFF444444, 10 ); + std::lock_guard lock( m_lock ); { const auto sz = m_frames.size();