diff options
Diffstat (limited to 'core/bind')
-rw-r--r-- | core/bind/core_bind.cpp | 17 | ||||
-rw-r--r-- | core/bind/core_bind.h | 4 |
2 files changed, 18 insertions, 3 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 0eacffeb88..efd7e3dbf5 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1266,7 +1266,7 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_processor_count"), &_OS::get_processor_count); ClassDB::bind_method(D_METHOD("get_executable_path"), &_OS::get_executable_path); - ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "blocking", "output", "read_stderr"), &_OS::execute, DEFVAL(Array()), DEFVAL(false)); + ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "blocking", "output", "read_stderr"), &_OS::execute, DEFVAL(true), DEFVAL(Array()), DEFVAL(false)); ClassDB::bind_method(D_METHOD("kill", "pid"), &_OS::kill); ClassDB::bind_method(D_METHOD("shell_open", "uri"), &_OS::shell_open); ClassDB::bind_method(D_METHOD("get_process_id"), &_OS::get_process_id); @@ -2773,8 +2773,9 @@ _Thread::_Thread() { _Thread::~_Thread() { - ERR_FAIL_COND_MSG(active, "Reference to a Thread object object was lost while the thread is still running..."); + ERR_FAIL_COND_MSG(active, "Reference to a Thread object was lost while the thread is still running..."); } + ///////////////////////////////////// PoolStringArray _ClassDB::get_class_list() const { @@ -3024,6 +3025,16 @@ float _Engine::get_frames_per_second() const { return Engine::get_singleton()->get_frames_per_second(); } +uint64_t _Engine::get_physics_frames() const { + + return Engine::get_singleton()->get_physics_frames(); +} + +uint64_t _Engine::get_idle_frames() const { + + return Engine::get_singleton()->get_idle_frames(); +} + void _Engine::set_time_scale(float p_scale) { Engine::get_singleton()->set_time_scale(p_scale); } @@ -3108,6 +3119,8 @@ void _Engine::_bind_methods() { ClassDB::bind_method(D_METHOD("get_frames_drawn"), &_Engine::get_frames_drawn); ClassDB::bind_method(D_METHOD("get_frames_per_second"), &_Engine::get_frames_per_second); + ClassDB::bind_method(D_METHOD("get_physics_frames"), &_Engine::get_physics_frames); + ClassDB::bind_method(D_METHOD("get_idle_frames"), &_Engine::get_idle_frames); ClassDB::bind_method(D_METHOD("get_main_loop"), &_Engine::get_main_loop); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 7c5031cad4..87da51f97e 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -227,7 +227,7 @@ public: int get_low_processor_usage_mode_sleep_usec() const; String get_executable_path() const; - int execute(const String &p_path, const Vector<String> &p_arguments, bool p_blocking, Array p_output = Array(), bool p_read_stderr = false); + int execute(const String &p_path, const Vector<String> &p_arguments, bool p_blocking = true, Array p_output = Array(), bool p_read_stderr = false); Error kill(int p_pid); Error shell_open(String p_uri); @@ -747,6 +747,8 @@ public: int get_target_fps() const; float get_frames_per_second() const; + uint64_t get_physics_frames() const; + uint64_t get_idle_frames() const; int get_frames_drawn(); |