summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 94dd895a26..878a1d4798 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1312,6 +1312,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
}
rendering_server->init();
+ rendering_server->set_render_loop_enabled(!disable_render_loop);
OS::get_singleton()->initialize_joypads();
@@ -2203,7 +2204,7 @@ bool Main::iteration() {
RenderingServer::get_singleton()->sync(); //sync if still drawing from previous frames.
- if (DisplayServer::get_singleton()->can_any_window_draw() && !disable_render_loop) {
+ if (DisplayServer::get_singleton()->can_any_window_draw() && RenderingServer::get_singleton()->is_render_loop_enabled()) {
if ((!force_redraw_requested) && OS::get_singleton()->is_in_low_processor_usage_mode()) {
if (RenderingServer::get_singleton()->has_changed()) {
RenderingServer::get_singleton()->draw(true, scaled_step); // flush visual commands