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;