summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rwxr-xr-xmain/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp
index e74402d7dd..cc20e65025 100755
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -832,8 +832,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->_keep_screen_on = GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true);
if (rtm == -1) {
rtm = GLOBAL_DEF("rendering/threads/thread_model", OS::RENDER_THREAD_SAFE);
- if (rtm >= 1) //hack for now
- rtm = 1;
}
if (rtm >= 0 && rtm < 3) {
@@ -912,6 +910,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
frame_delay = GLOBAL_DEF("application/run/frame_delay_msec", 0);
}
+ OS::get_singleton()->set_low_processor_usage_mode(GLOBAL_DEF("application/run/low_processor_mode", false));
+ OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(GLOBAL_DEF("application/run/low_processor_mode_sleep_usec", 8000));
+
Engine::get_singleton()->set_frame_delay(frame_delay);
message_queue = memnew(MessageQueue);
@@ -1775,7 +1776,7 @@ bool Main::iteration() {
return exit;
if (OS::get_singleton()->is_in_low_processor_usage_mode() || !OS::get_singleton()->can_draw())
- OS::get_singleton()->delay_usec(16600); //apply some delay to force idle time (results in about 60 FPS max)
+ OS::get_singleton()->delay_usec(OS::get_singleton()->get_low_processor_usage_mode_sleep_usec()); //apply some delay to force idle time (results in about 60 FPS max)
else {
uint32_t frame_delay = Engine::get_singleton()->get_frame_delay();
if (frame_delay)