|
@@ -1789,9 +1789,9 @@ uint64_t Main::target_ticks = 0;
|
|
uint32_t Main::frames = 0;
|
|
uint32_t Main::frames = 0;
|
|
uint32_t Main::frame = 0;
|
|
uint32_t Main::frame = 0;
|
|
bool Main::force_redraw_requested = false;
|
|
bool Main::force_redraw_requested = false;
|
|
-bool Main::iterating = false;
|
|
|
|
|
|
+int Main::iterating = 0;
|
|
bool Main::is_iterating() {
|
|
bool Main::is_iterating() {
|
|
- return iterating;
|
|
|
|
|
|
+ return iterating > 0;
|
|
}
|
|
}
|
|
|
|
|
|
// For performance metrics
|
|
// For performance metrics
|
|
@@ -1803,7 +1803,7 @@ bool Main::iteration() {
|
|
//for now do not error on this
|
|
//for now do not error on this
|
|
//ERR_FAIL_COND_V(iterating, false);
|
|
//ERR_FAIL_COND_V(iterating, false);
|
|
|
|
|
|
- iterating = true;
|
|
|
|
|
|
+ iterating++;
|
|
|
|
|
|
uint64_t ticks = OS::get_singleton()->get_ticks_usec();
|
|
uint64_t ticks = OS::get_singleton()->get_ticks_usec();
|
|
Engine::get_singleton()->_frame_ticks = ticks;
|
|
Engine::get_singleton()->_frame_ticks = ticks;
|
|
@@ -1932,7 +1932,7 @@ bool Main::iteration() {
|
|
frames = 0;
|
|
frames = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- iterating = false;
|
|
|
|
|
|
+ iterating--;
|
|
|
|
|
|
if (fixed_fps != -1)
|
|
if (fixed_fps != -1)
|
|
return exit;
|
|
return exit;
|