diff options
author | Anish Bhobe <anishbhobe@hotmail.com> | 2019-03-09 17:06:37 +0530 |
---|---|---|
committer | Anish Bhobe <anishbhobe@hotmail.com> | 2019-03-09 17:13:08 +0530 |
commit | 3c27980a178ce26e584b36ea4bf2fc3f661c903b (patch) | |
tree | 3a1c403f041441baab4243277d423c98c983f9f6 /main/main.cpp | |
parent | 9d36ce25e81c6d19e82e87a0468578b12b6b4be8 (diff) |
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
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 3dff9d89bd..3d72e90f2c 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1881,7 +1881,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. |