Переглянути джерело

Fixes physic_fps=0 bug.

Added a condition to check if the loop exited without iteration
being run by checking the return value from idle().

Fixes: #26321
(cherry picked from commit 3c27980a178ce26e584b36ea4bf2fc3f661c903b)
Anish Bhobe 6 роки тому
батько
коміт
fdb94e3409
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      main/main.cpp

+ 3 - 1
main/main.cpp

@@ -1876,7 +1876,9 @@ bool Main::iteration() {
 
 	uint64_t idle_begin = OS::get_singleton()->get_ticks_usec();
 
-	OS::get_singleton()->get_main_loop()->idle(step * time_scale);
+	if (OS::get_singleton()->get_main_loop()->idle(step * time_scale)) {
+		exit = true;
+	}
 	message_queue->flush();
 
 	VisualServer::get_singleton()->sync(); //sync if still drawing from previous frames.