mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-17 08:48:14 +00:00
Wait for events when window is minimized...
...instead of keep polling
This commit is contained in:
@@ -494,7 +494,7 @@ bool WindowShouldClose(void)
|
|||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
||||||
// While window minimized, stop loop execution
|
// While window minimized, stop loop execution
|
||||||
while (windowMinimized) glfwPollEvents();
|
while (windowMinimized) glfwWaitEvents();
|
||||||
|
|
||||||
return (glfwWindowShouldClose(window));
|
return (glfwWindowShouldClose(window));
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user