1
0
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:
Bartosz Taudul 2024-03-29 21:46:24 +01:00
parent 767f7e4fd4
commit 547325f270
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

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