diff --git a/server/TracyUserData.cpp b/server/TracyUserData.cpp index 2837f257..8ac7c876 100644 --- a/server/TracyUserData.cpp +++ b/server/TracyUserData.cpp @@ -20,7 +20,7 @@ constexpr auto FileOptions = "options"; constexpr auto FileAnnotations = "annotations"; enum : uint32_t { VersionTimeline = 0 }; -enum : uint32_t { VersionOptions = 3 }; +enum : uint32_t { VersionOptions = 4 }; enum : uint32_t { VersionAnnotations = 0 }; UserData::UserData() @@ -104,6 +104,7 @@ void UserData::LoadState( ViewData& data ) fread( &data.darkenContextSwitches, 1, sizeof( data.darkenContextSwitches ), f ); fread( &data.drawCpuData, 1, sizeof( data.drawCpuData ), f ); fread( &data.drawCpuUsageGraph, 1, sizeof( data.drawCpuUsageGraph ), f ); + fread( &data.drawSamples, 1, sizeof( data.drawSamples ), f ); fread( &data.dynamicColors, 1, sizeof( data.dynamicColors ), f ); } fclose( f ); @@ -143,6 +144,7 @@ void UserData::SaveState( const ViewData& data ) fwrite( &data.darkenContextSwitches, 1, sizeof( data.darkenContextSwitches ), f ); fwrite( &data.drawCpuData, 1, sizeof( data.drawCpuData ), f ); fwrite( &data.drawCpuUsageGraph, 1, sizeof( data.drawCpuUsageGraph ), f ); + fwrite( &data.drawSamples, 1, sizeof( data.drawSamples ), f ); fwrite( &data.dynamicColors, 1, sizeof( data.dynamicColors ), f ); fclose( f ); } diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 0ac692ae..fdd5e416 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -7265,6 +7265,14 @@ void View::DrawOptions() #endif m_vd.drawCpuUsageGraph = val; ImGui::Unindent(); + val = m_vd.drawSamples; +#ifdef TRACY_EXTENDED_FONT + ImGui::Checkbox( ICON_FA_EYE_DROPPER " Draw stack samples", &val ); +#else + ImGui::Checkbox( "Draw stack samples", &val ); +#endif + m_vd.drawSamples = val; + } const auto& gpuData = m_worker.GetGpuData(); diff --git a/server/TracyViewData.hpp b/server/TracyViewData.hpp index e9869541..955bf213 100644 --- a/server/TracyViewData.hpp +++ b/server/TracyViewData.hpp @@ -25,6 +25,7 @@ struct ViewData uint8_t darkenContextSwitches = true; uint8_t drawCpuData = true; uint8_t drawCpuUsageGraph = true; + uint8_t drawSamples = true; uint8_t dynamicColors = 1; };