mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-17 17:08:33 +00:00
Examples: GLFW: rework examples main loop to handle minimization without burning CPU or GPU by running unthrottled code. (#7844)
Backends: GLFW: added ImGui_ImplGlfw_Sleep() helper.
This commit is contained in:
@@ -494,6 +494,11 @@ int main(int, char**)
|
||||
g_MainWindowData.FrameIndex = 0;
|
||||
g_SwapChainRebuild = false;
|
||||
}
|
||||
if (glfwGetWindowAttrib(window, GLFW_ICONIFIED) != 0)
|
||||
{
|
||||
ImGui_ImplGlfw_Sleep(10);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Start the Dear ImGui frame
|
||||
ImGui_ImplVulkan_NewFrame();
|
||||
|
||||
Reference in New Issue
Block a user