Explorar o código

Reset close status for next frame #1339

raysan5 %!s(int64=5) %!d(string=hai) anos
pai
achega
2c7dc70878
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/core.c

+ 3 - 0
src/core.c

@@ -849,6 +849,9 @@ bool WindowShouldClose(void)
         while (!CORE.Window.alwaysRun && CORE.Window.minimized) glfwWaitEvents();
 
         CORE.Window.shouldClose = glfwWindowShouldClose(CORE.Window.handle);
+        
+        // Reset close status for next frame
+        glfwSetWindowShouldClose(CORE.Window.handle, GLFW_FALSE);
 
         return CORE.Window.shouldClose;
     }