diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-10-02 16:38:39 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-10-03 17:36:14 -0300 |
commit | 3cadecf17be08198f8a28e0674bfde30c8fc824f (patch) | |
tree | d7f50c210e56efbce70253485c69c23aa3af5bad /core/os/os.cpp | |
parent | a848fa6cdeb00f0c40f259cde2d59112272e3c51 (diff) | |
download | redot-engine-3cadecf17be08198f8a28e0674bfde30c8fc824f.tar.gz |
fixed the OS.has_feature() API, and added support for 32 and 64.
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r-- | core/os/os.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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; |