summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2018-07-25 23:20:54 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2018-07-25 23:27:50 +0200
commit0254a408173f36ba194dc3b69543d85d66e832fa (patch)
treebeeefa244a6ec0c0961a9a13aa3d90450d626148
parentc0c795474ee1914b87b89f4aab4aa7d1179659aa (diff)
Add "editor" and "standalone" feature tags
These feature tags can be used to check whether the project was started from an editor binary or from an export template binary.
-rw-r--r--core/os/os.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 8dcf0990fc..97dae05919 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -577,6 +577,13 @@ bool OS::has_feature(const String &p_feature) {
if (p_feature == "release")
return true;
#endif
+#ifdef TOOLS_ENABLED
+ if (p_feature == "editor")
+ return true;
+#else
+ if (p_feature == "standalone")
+ return true;
+#endif
if (sizeof(void *) == 8 && p_feature == "64") {
return true;