mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Check for activity in View.
This commit is contained in:
parent
a8276c41c3
commit
b3e9a03856
@ -271,6 +271,12 @@ static void DrawContents()
|
||||
bptr->NewFrame( display_w, display_h );
|
||||
|
||||
static int activeFrames = 3;
|
||||
if( view && view->WasActive() )
|
||||
{
|
||||
activeFrames = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto& inputQueue = ImGui::GetCurrentContext()->InputEventsQueue;
|
||||
if( !inputQueue.empty() )
|
||||
{
|
||||
@ -283,6 +289,7 @@ static void DrawContents()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if( activeFrames == 0 )
|
||||
{
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 16 ) );
|
||||
|
Loading…
Reference in New Issue
Block a user