From 3cadecf17be08198f8a28e0674bfde30c8fc824f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 2 Oct 2017 16:38:39 -0300 Subject: fixed the OS.has_feature() API, and added support for 32 and 64. --- core/os/os.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'core/os/os.cpp') diff --git a/core/os/os.cpp b/core/os/os.cpp index ff17cdb508..f2295823b2 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -494,7 +494,7 @@ int OS::get_power_percent_left() { return -1; } -bool OS::check_feature_support(const String &p_feature) { +bool OS::has_feature(const String &p_feature) { if (p_feature == get_name()) return true; @@ -506,6 +506,13 @@ bool OS::check_feature_support(const String &p_feature) { return true; #endif + if (sizeof(void *) == 8 && p_feature == "64") { + return true; + } + if (sizeof(void *) == 4 && p_feature == "32") { + return true; + } + if (_check_internal_feature_support(p_feature)) return true; -- cgit v1.2.3