mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Reduce viewer frame rate when it doesn't have focus.
This commit is contained in:
parent
672925ac04
commit
43255b01fa
@ -252,6 +252,11 @@ int main( int argc, char** argv )
|
||||
ImGui::Render();
|
||||
ImGui_ImplGlfwGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
glfwSwapBuffers(window);
|
||||
|
||||
if( !glfwGetWindowAttrib( window, GLFW_FOCUSED ) )
|
||||
{
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 50 ) );
|
||||
}
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
|
Loading…
Reference in New Issue
Block a user