diff options
author | Brian Semrau <brian.semrau@gmail.com> | 2021-11-12 19:10:33 -0500 |
---|---|---|
committer | Brian Semrau <brian.semrau@gmail.com> | 2021-11-12 19:28:49 -0500 |
commit | c558263d84e974c95efe4d1e34539d4232e5d26f (patch) | |
tree | e1104420c31ec527bdc219826b552b092849b03a /core/core_bind.cpp | |
parent | 19571c9c4bb8c388ac5d9a0255a8c18c4680b7df (diff) | |
download | redot-engine-c558263d84e974c95efe4d1e34539d4232e5d26f.tar.gz |
Expose Thread::get_main_id in core bindings
Diffstat (limited to 'core/core_bind.cpp')
-rw-r--r-- | core/core_bind.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp index d42d39a159..0bf6efc96d 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -315,6 +315,10 @@ Error OS::set_thread_name(const String &p_name) { return ::Thread::get_caller_id(); }; +::Thread::ID OS::get_main_thread_id() const { + return ::Thread::get_main_id(); +}; + bool OS::has_feature(const String &p_feature) const { return ::OS::get_singleton()->has_feature(p_feature); } @@ -601,6 +605,7 @@ void OS::_bind_methods() { ClassDB::bind_method(D_METHOD("set_thread_name", "name"), &OS::set_thread_name); ClassDB::bind_method(D_METHOD("get_thread_caller_id"), &OS::get_thread_caller_id); + ClassDB::bind_method(D_METHOD("get_main_thread_id"), &OS::get_main_thread_id); ClassDB::bind_method(D_METHOD("has_feature", "tag_name"), &OS::has_feature); |