aboutsummaryrefslogtreecommitdiff
path: root/core/os/os.cpp
diff options
context:
space:
mode:
authorRuslan Mustakov2017-10-02 22:01:43 +0700
committerRuslan Mustakov2017-11-21 01:16:49 +0700
commit8f0f327f0207cbde27bbfba3ac106b9457d7201b (patch)
tree873fcacabc6feaee5dad537f654a3df2c4d3f50e /core/os/os.cpp
parent82ad05a20ef4420122b18eadf3835c4a8a49ba19 (diff)
downloadgodot-8f0f327f0207cbde27bbfba3ac106b9457d7201b.tar.gz
godot-8f0f327f0207cbde27bbfba3ac106b9457d7201b.tar.zst
godot-8f0f327f0207cbde27bbfba3ac106b9457d7201b.zip
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r--core/os/os.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 65d0b2e05..dd71f8a9c 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -548,6 +548,33 @@ bool OS::has_feature(const String &p_feature) {
if (sizeof(void *) == 4 && p_feature == "32") {
return true;
}
+#if defined(__x86_64) || defined(__x86_64__)
+ if (p_feature == "x86_64") {
+ return true;
+ }
+#elif (defined(__i386) || defined(__i386__))
+ if (p_feature == "x86") {
+ return true;
+ }
+#elif defined(__aarch64__)
+ if (p_feature == "arm64") {
+ return true;
+ }
+#elif defined(__arm__)
+#if defined(__ARM_ARCH_7A__)
+ if (p_feature == "armv7a" || p_feature == "armv7") {
+ return true;
+ }
+#endif
+#if defined(__ARM_ARCH_7S__)
+ if (p_feature == "armv7s" || p_feature == "armv7") {
+ return true;
+ }
+#endif
+ if (p_feature == "arm") {
+ return true;
+ }
+#endif
if (_check_internal_feature_support(p_feature))
return true;