mirror of
https://github.com/wolfpld/tracy
synced 2025-05-05 14:43:53 +00:00
Reduce framerate on Wayland when profiler window has no focus.
This commit is contained in:
parent
767f7e4fd4
commit
547325f270
@ -876,6 +876,7 @@ void Backend::Run()
|
|||||||
{
|
{
|
||||||
while( s_running && wl_display_dispatch( s_dpy ) != -1 )
|
while( s_running && wl_display_dispatch( s_dpy ) != -1 )
|
||||||
{
|
{
|
||||||
|
if( !s_hasFocus ) std::this_thread::sleep_for( std::chrono::milliseconds( 50 ) );
|
||||||
s_redraw();
|
s_redraw();
|
||||||
s_mainThreadTasks->Run();
|
s_mainThreadTasks->Run();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user