From 172f32d07534ba6cbb2140f73c17af712396afc1 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 14 Jul 2026 16:59:28 +0200 Subject: [PATCH] Use section categories in dyna example. --- examples/dyna/src/game.cpp | 3 ++- examples/dyna/src/main.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/dyna/src/game.cpp b/examples/dyna/src/game.cpp index 14d384c6..6be6c3f7 100644 --- a/examples/dyna/src/game.cpp +++ b/examples/dyna/src/game.cpp @@ -24,6 +24,7 @@ namespace struct TracySection { explicit TracySection( const char* name ) { Enter( name ); } + explicit TracySection( const char* name, uint16_t category ) : idx( TracySectionEnterCategory( category, "%s", name ) ) {} ~TracySection() { Leave(); } void Enter( const char* name ) @@ -52,7 +53,7 @@ bool help = false; // escape, or reaching the exit) and control should return to the caller. bool level_loop( World& world ) { - TracySection section( ( std::string( "Level " ) + world.name() ).c_str() ); + TracySection section( ( std::string( "Level " ) + world.name() ).c_str(), 1 ); Player* p = world.player(); diff --git a/examples/dyna/src/main.cpp b/examples/dyna/src/main.cpp index 68f21f9a..0be79689 100644 --- a/examples/dyna/src/main.cpp +++ b/examples/dyna/src/main.cpp @@ -28,6 +28,9 @@ int main( int /*argc*/, char* /*argv*/[] ) { TracyNoop; + TracySectionSetup( 0, "Game state" ); + TracySectionSetup( 1, "Level progression" ); + if( !dyna::Init::all() ) return 1;