Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-09-28 01:31:42 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-09-28 01:36:00 +0300
commitfb4d76469b403da6a0d99d3d5905a4dc47573bce (patch)
tree73cc65123b846bc26342ecb3d4411f8ce944a7ca /server
parentc7ec2a9e0e2819bfd9dce064c50f1b97c5c28c09 (diff)
Activity tracking global variable.
Diffstat (limited to 'server')
-rw-r--r--server/TracyImGui.cpp13
-rw-r--r--server/TracyImGui.hpp4
2 files changed, 17 insertions, 0 deletions
diff --git a/server/TracyImGui.cpp b/server/TracyImGui.cpp
index ed50398b..f4aaff84 100644
--- a/server/TracyImGui.cpp
+++ b/server/TracyImGui.cpp
@@ -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 );
diff --git a/server/TracyImGui.hpp b/server/TracyImGui.hpp
index a0f218ef..fd3c04d7 100644
--- a/server/TracyImGui.hpp
+++ b/server/TracyImGui.hpp
@@ -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 );