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 )
{
if( !s_hasFocus ) std::this_thread::sleep_for( std::chrono::milliseconds( 50 ) );
s_redraw();
s_mainThreadTasks->Run();
}