mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Activity tracking global variable.
This commit is contained in:
parent
c7ec2a9e0e
commit
fb4d76469b
@ -271,7 +271,7 @@ static void DrawContents()
|
||||
bptr->NewFrame( display_w, display_h );
|
||||
|
||||
static int activeFrames = 3;
|
||||
if( view && view->WasActive() )
|
||||
if( tracy::WasActive() || ( view && view->WasActive() ) )
|
||||
{
|
||||
activeFrames = 3;
|
||||
}
|
||||
|
@ -13,6 +13,19 @@
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
bool s_wasActive = false;
|
||||
|
||||
bool WasActive()
|
||||
{
|
||||
if( s_wasActive )
|
||||
{
|
||||
s_wasActive = false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void DrawZigZag( ImDrawList* draw, const ImVec2& wpos, double start, double end, double h, uint32_t color, float thickness )
|
||||
{
|
||||
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );
|
||||
|
@ -22,6 +22,10 @@ static inline ImVec2 operator-( const ImVec2& l, const ImVec2& r ) { return ImVe
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
extern bool s_wasActive;
|
||||
bool WasActive();
|
||||
|
||||
|
||||
void DrawZigZag( ImDrawList* draw, const ImVec2& wpos, double start, double end, double h, uint32_t color, float thickness = 1.f );
|
||||
void DrawStripedRect( ImDrawList* draw, const ImVec2& wpos, double x0, double y0, double x1, double y1, double sw, uint32_t color, bool fix_stripes_in_screen_space, bool inverted );
|
||||
void DrawHistogramMinMaxLabel( ImDrawList* draw, int64_t tmin, int64_t tmax, ImVec2 wpos, float w, float ty );
|
||||
|
Loading…
Reference in New Issue
Block a user