Use section categories in dyna example.

This commit is contained in:
Bartosz Taudul
2026-07-14 16:59:28 +02:00
parent 7dab948434
commit 172f32d075
2 changed files with 5 additions and 1 deletions

View File

@@ -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();

View File

@@ -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;