summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-07-09 12:34:30 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-07-09 12:34:30 -0300
commit920310e72af9f9e36c007fdfe19ae03ce3f0c670 (patch)
tree0b8dd5e4ede4c039162cfef687c3f26dc6cd9f34 /main
parentb0f0ae072367b061e4ff59b17b920f2d67b41e3a (diff)
removed target_fps option, moved it to debug (it makes no sense for games). Added a frame_delay option for games that don't want to use the CPU fully.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 41a032842d..adaebab1d4 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -101,6 +101,7 @@ static bool init_fullscreen=false;
static bool init_use_custom_pos=false;
static bool debug_collisions=false;
static bool debug_navigation=false;
+static int frame_delay=0;
static Vector2 init_custom_pos;
static int video_driver_idx=-1;
static int audio_driver_idx=-1;
@@ -488,7 +489,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
if (I->next()) {
- OS::get_singleton()->set_frame_delay(I->next()->get().to_int());
+ frame_delay=I->next()->get().to_int();
N=I->next()->next();
} else {
goto error;
@@ -805,12 +806,19 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
OS::get_singleton()->set_screen_orientation(OS::SCREEN_LANDSCAPE);
}
+
OS::get_singleton()->set_iterations_per_second(GLOBAL_DEF("physics/fixed_fps",60));
- OS::get_singleton()->set_target_fps(GLOBAL_DEF("application/target_fps",0));
+ OS::get_singleton()->set_target_fps(GLOBAL_DEF("debug/force_fps",0));
if (!OS::get_singleton()->_verbose_stdout) //overrided
OS::get_singleton()->_verbose_stdout=GLOBAL_DEF("debug/verbose_stdout",false);
+ if (frame_delay==0) {
+ frame_delay=GLOBAL_DEF("application/frame_delay_msec",0);
+ }
+
+ OS::get_singleton()->set_frame_delay(frame_delay);
+
message_queue = memnew( MessageQueue );
Globals::get_singleton()->register_global_defaults();