diff options
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/main/main.cpp b/main/main.cpp index 9096b935c2..48df37ac63 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -231,7 +231,6 @@ void Main::print_help(const char *p_binary) { } Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_phase) { - RID_OwnerBase::init_rid(); OS::get_singleton()->initialize_core(); @@ -254,6 +253,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph register_core_settings(); //here globals is present + OS::get_singleton()->initialize_logger(); + translation_server = memnew(TranslationServer); performance = memnew(Performance); globals->add_singleton(ProjectSettings::Singleton("Performance", performance)); @@ -1574,7 +1575,7 @@ uint32_t Main::frame = 0; bool Main::force_redraw_requested = false; //for performance metrics -static uint64_t fixed_process_max = 0; +static uint64_t physics_process_max = 0; static uint64_t idle_process_max = 0; bool Main::iteration() { @@ -1597,7 +1598,7 @@ bool Main::iteration() { return false; */ - uint64_t fixed_process_ticks = 0; + uint64_t physics_process_ticks = 0; uint64_t idle_process_ticks = 0; frame += ticks_elapsed; @@ -1615,7 +1616,7 @@ bool Main::iteration() { int iters = 0; - Engine::get_singleton()->_in_fixed = true; + Engine::get_singleton()->_in_physics = true; while (time_accum > frame_slice) { @@ -1642,13 +1643,13 @@ bool Main::iteration() { time_accum -= frame_slice; message_queue->flush(); - fixed_process_ticks = MAX(fixed_process_ticks, OS::get_singleton()->get_ticks_usec() - fixed_begin); // keep the largest one for reference - fixed_process_max = MAX(OS::get_singleton()->get_ticks_usec() - fixed_begin, fixed_process_max); + physics_process_ticks = MAX(physics_process_ticks, OS::get_singleton()->get_ticks_usec() - fixed_begin); // keep the largest one for reference + physics_process_max = MAX(OS::get_singleton()->get_ticks_usec() - fixed_begin, physics_process_max); iters++; - Engine::get_singleton()->_fixed_frames++; + Engine::get_singleton()->_physics_frames++; } - Engine::get_singleton()->_in_fixed = false; + Engine::get_singleton()->_in_physics = false; uint64_t idle_begin = OS::get_singleton()->get_ticks_usec(); @@ -1684,7 +1685,7 @@ bool Main::iteration() { if (script_debugger) { if (script_debugger->is_profiling()) { - script_debugger->profiling_set_frame_times(USEC_TO_SEC(frame_time), USEC_TO_SEC(idle_process_ticks), USEC_TO_SEC(fixed_process_ticks), frame_slice); + script_debugger->profiling_set_frame_times(USEC_TO_SEC(frame_time), USEC_TO_SEC(idle_process_ticks), USEC_TO_SEC(physics_process_ticks), frame_slice); } script_debugger->idle_poll(); } @@ -1700,9 +1701,9 @@ bool Main::iteration() { Engine::get_singleton()->_fps = frames; performance->set_process_time(USEC_TO_SEC(idle_process_max)); - performance->set_fixed_process_time(USEC_TO_SEC(fixed_process_max)); + performance->set_physics_process_time(USEC_TO_SEC(physics_process_max)); idle_process_max = 0; - fixed_process_max = 0; + physics_process_max = 0; frame %= 1000000; frames = 0; |