mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Don't display CPU usage until data is ready.
This commit is contained in:
parent
50b96c757e
commit
6a500ccdb3
@ -4416,7 +4416,11 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
|
|||||||
const auto cpuCnt = m_worker.GetCpuDataCpuCount();
|
const auto cpuCnt = m_worker.GetCpuDataCpuCount();
|
||||||
assert( cpuCnt != 0 );
|
assert( cpuCnt != 0 );
|
||||||
|
|
||||||
|
#ifdef TRACY_NO_STATISTICS
|
||||||
if( m_vd.drawCpuUsageGraph )
|
if( m_vd.drawCpuUsageGraph )
|
||||||
|
#else
|
||||||
|
if( m_vd.drawCpuUsageGraph && m_worker.IsCpuUsageReady() )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
const auto cpuUsageHeight = floor( 30.f * ImGui::GetTextLineHeight() / 15.f );
|
const auto cpuUsageHeight = floor( 30.f * ImGui::GetTextLineHeight() / 15.f );
|
||||||
if( wpos.y + offset + cpuUsageHeight + 3 >= yMin && wpos.y + offset <= yMax )
|
if( wpos.y + offset + cpuUsageHeight + 3 >= yMin && wpos.y + offset <= yMax )
|
||||||
|
Loading…
Reference in New Issue
Block a user