mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Hide context switch options, if no data is available.
This commit is contained in:
parent
ffdb6d8a3b
commit
acfcfb09ce
@ -6478,27 +6478,31 @@ void View::DrawOptions()
|
|||||||
ImGui::Checkbox( "Draw empty labels", &val );
|
ImGui::Checkbox( "Draw empty labels", &val );
|
||||||
#endif
|
#endif
|
||||||
m_vd.drawEmptyLabels = val;
|
m_vd.drawEmptyLabels = val;
|
||||||
val = m_vd.drawContextSwitches;
|
if( m_worker.HasContextSwitches() )
|
||||||
|
{
|
||||||
|
ImGui::Separator();
|
||||||
|
val = m_vd.drawContextSwitches;
|
||||||
#ifdef TRACY_EXTENDED_FONT
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
ImGui::Checkbox( ICON_FA_HIKING " Draw context switches", &val );
|
ImGui::Checkbox( ICON_FA_HIKING " Draw context switches", &val );
|
||||||
#else
|
#else
|
||||||
ImGui::Checkbox( "Draw context switches", &val );
|
ImGui::Checkbox( "Draw context switches", &val );
|
||||||
#endif
|
#endif
|
||||||
m_vd.drawContextSwitches = val;
|
m_vd.drawContextSwitches = val;
|
||||||
val = m_vd.darkenContextSwitches;
|
val = m_vd.darkenContextSwitches;
|
||||||
#ifdef TRACY_EXTENDED_FONT
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
ImGui::Checkbox( ICON_FA_MOON " Darken inactive threads", &val );
|
ImGui::Checkbox( ICON_FA_MOON " Darken inactive threads", &val );
|
||||||
#else
|
#else
|
||||||
ImGui::Checkbox( "Darken inactive threads", &val );
|
ImGui::Checkbox( "Darken inactive threads", &val );
|
||||||
#endif
|
#endif
|
||||||
m_vd.darkenContextSwitches = val;
|
m_vd.darkenContextSwitches = val;
|
||||||
val = m_vd.drawCpuData;
|
val = m_vd.drawCpuData;
|
||||||
#ifdef TRACY_EXTENDED_FONT
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
ImGui::Checkbox( ICON_FA_SLIDERS_H " Draw CPU data", &val );
|
ImGui::Checkbox( ICON_FA_SLIDERS_H " Draw CPU data", &val );
|
||||||
#else
|
#else
|
||||||
ImGui::Checkbox( "Draw CPU data", &val );
|
ImGui::Checkbox( "Draw CPU data", &val );
|
||||||
#endif
|
#endif
|
||||||
m_vd.drawCpuData = val;
|
m_vd.drawCpuData = val;
|
||||||
|
}
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
const auto& gpuData = m_worker.GetGpuData();
|
const auto& gpuData = m_worker.GetGpuData();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user