From 8ab2cf09b792fc3185b94a7004d38698c2c3e3a5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 9 Nov 2019 23:20:34 +0100 Subject: [PATCH] Handle magic vectors during dispatch. --- server/TracyView.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 63949d5c..5a9bd666 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3010,11 +3010,25 @@ int View::DispatchZoneLevel( const Vector>& vec, bool hover const auto yPos = wpos.y + offset; if( yPos + ostep >= yMin && yPos <= yMax ) { - return DrawZoneLevel>( vec, hover, pxns, nspx, wpos, _offset, depth, yMin, yMax, tid ); + if( vec.is_magic() ) + { + return DrawZoneLevel>( *(Vector*)( &vec ), hover, pxns, nspx, wpos, _offset, depth, yMin, yMax, tid ); + } + else + { + return DrawZoneLevel>( vec, hover, pxns, nspx, wpos, _offset, depth, yMin, yMax, tid ); + } } else { - return SkipZoneLevel>( vec, hover, pxns, nspx, wpos, _offset, depth, yMin, yMax, tid ); + if( vec.is_magic() ) + { + return SkipZoneLevel>( *(Vector*)( &vec ), hover, pxns, nspx, wpos, _offset, depth, yMin, yMax, tid ); + } + else + { + return SkipZoneLevel>( vec, hover, pxns, nspx, wpos, _offset, depth, yMin, yMax, tid ); + } } }