From aa8175ed47e870b285d86aae482281fe77588cfb Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 23 Mar 2023 00:39:45 +0100 Subject: [PATCH] Include DPI scaling in folding calculations. --- server/TracyTimelineItemThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/TracyTimelineItemThread.cpp b/server/TracyTimelineItemThread.cpp index be27a221..2040a8c6 100644 --- a/server/TracyTimelineItemThread.cpp +++ b/server/TracyTimelineItemThread.cpp @@ -327,7 +327,7 @@ int TimelineItemThread::PreprocessGhostLevel( const TimelineContext& ctx, const const auto vStart = ctx.vStart; const auto vEnd = ctx.vEnd; - const auto MinVisNs = int64_t( round( MinVisSize * nspx ) ); + const auto MinVisNs = int64_t( round( GetScale() * MinVisSize * nspx ) ); auto it = std::lower_bound( vec.begin(), vec.end(), std::max( 0, vStart - 2 * MinVisNs ), [] ( const auto& l, const auto& r ) { return l.end.Val() < r; } ); if( it == vec.end() ) return depth; @@ -395,7 +395,7 @@ int TimelineItemThread::PreprocessZoneLevel( const TimelineContext& ctx, const V const auto vEnd = ctx.vEnd; const auto nspx = ctx.nspx; - const auto MinVisNs = int64_t( round( MinVisSize * nspx ) ); + const auto MinVisNs = int64_t( round( GetScale() * MinVisSize * nspx ) ); // cast to uint64_t, so that unended zones (end = -1) are still drawn auto it = std::lower_bound( vec.begin(), vec.end(), std::max( 0, vStart - std::max( delay, 2 * MinVisNs ) ), [] ( const auto& l, const auto& r ) { Adapter a; return (uint64_t)a(l).End() < (uint64_t)r; } );