mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-23 01:00:54 +00:00
Use section categories in dyna example.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user