diff --git a/server/TracyTimelineController.cpp b/server/TracyTimelineController.cpp index 1116ee2d..3b2d184a 100644 --- a/server/TracyTimelineController.cpp +++ b/server/TracyTimelineController.cpp @@ -2,6 +2,7 @@ #include "TracyImGui.hpp" #include "TracyTimelineController.hpp" +#include "TracyView.hpp" namespace tracy { @@ -106,6 +107,8 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, bool UpdateCenterItem(); } + const auto& viewData = m_view.GetViewData(); + TimelineContext ctx; ctx.w = ImGui::GetContentRegionAvail().x - 1; ctx.ty = ImGui::GetTextLineHeight(); @@ -114,6 +117,8 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, bool ctx.yMax = yMax; ctx.pxns = pxns; ctx.nspx = 1.0 / pxns; + ctx.vStart = viewData.zvStart; + ctx.vEnd = viewData.zvEnd; ctx.wpos = wpos; ctx.hover = hover; diff --git a/server/TracyTimelineItem.hpp b/server/TracyTimelineItem.hpp index 6e6b769e..a484593e 100644 --- a/server/TracyTimelineItem.hpp +++ b/server/TracyTimelineItem.hpp @@ -17,6 +17,7 @@ struct TimelineContext float w, ty, scale; float yMin, yMax; double pxns, nspx; + int64_t vStart, vEnd; ImVec2 wpos; bool hover; };