|
@@ -910,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);
|
|
@@ -1773,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)
|