aboutsummaryrefslogtreecommitdiff
path: root/core/bind
diff options
context:
space:
mode:
authorJuan Linietsky2017-10-02 16:38:39 -0300
committerJuan Linietsky2017-10-03 17:36:14 -0300
commit3cadecf17be08198f8a28e0674bfde30c8fc824f (patch)
treed7f50c210e56efbce70253485c69c23aa3af5bad /core/bind
parenta848fa6cdeb00f0c40f259cde2d59112272e3c51 (diff)
downloadgodot-3cadecf17be08198f8a28e0674bfde30c8fc824f.tar.gz
godot-3cadecf17be08198f8a28e0674bfde30c8fc824f.tar.zst
godot-3cadecf17be08198f8a28e0674bfde30c8fc824f.zip
fixed the OS.has_feature() API, and added support for 32 and 64.
Diffstat (limited to 'core/bind')
-rw-r--r--core/bind/core_bind.cpp7
-rw-r--r--core/bind/core_bind.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 7de1c7e6b..9c655b946 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -453,6 +453,11 @@ int _OS::get_power_percent_left() {
return OS::get_singleton()->get_power_percent_left();
}
+bool _OS::has_feature(const String &p_feature) const {
+
+ return OS::get_singleton()->has_feature(p_feature);
+}
+
/*
enum Weekday {
DAY_SUNDAY,
@@ -1105,6 +1110,8 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_vsync", "enable"), &_OS::set_use_vsync);
ClassDB::bind_method(D_METHOD("is_vsync_enabled"), &_OS::is_vsync_enabled);
+ ClassDB::bind_method(D_METHOD("has_feature", "tag_name"), &_OS::has_feature);
+
ClassDB::bind_method(D_METHOD("get_power_state"), &_OS::get_power_state);
ClassDB::bind_method(D_METHOD("get_power_seconds_left"), &_OS::get_power_seconds_left);
ClassDB::bind_method(D_METHOD("get_power_percent_left"), &_OS::get_power_percent_left);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 6f3606dcc..d69cb86e4 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -317,6 +317,8 @@ public:
int get_power_seconds_left();
int get_power_percent_left();
+ bool has_feature(const String &p_feature) const;
+
static _OS *get_singleton() { return singleton; }
_OS();