Skip to content

Commit a5ed67d

Browse files
author
ryuukk
authored
Allow lua to process some calculations
1 parent 8e0f9cd commit a5ed67d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

engine/system/win/sys_main.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -842,10 +842,12 @@ bool sys_main_c::Run(int argc, char** argv)
842842

843843
// Run frame loop
844844
while (exitFlag == false) {
845-
if (minimized)
846-
glfwWaitEvents(); // while minimized, puts process to sleep until it receives an event
847-
else
845+
if (minimized) {
846+
glfwWaitEventsTimeout(0.1);
847+
}
848+
else {
848849
glfwPollEvents();
850+
}
849851
auto wnd = (GLFWwindow*)video->GetWindowHandle();
850852
if (glfwWindowShouldClose(wnd)) {
851853
Exit();

0 commit comments

Comments
 (0)