diff options
author | Mikael Hermansson <mikael@hermansson.io> | 2022-12-03 18:17:04 +0100 |
---|---|---|
committer | Mikael Hermansson <mikael@hermansson.io> | 2022-12-07 16:13:17 +0100 |
commit | 8c108177d74c713936ed9a1f637fad05168783bf (patch) | |
tree | 5747d5e8a96d11021cf54a1252d5c5fc2ebe84ed /core/os | |
parent | a7937fe54cd2c1f407a529e46e2708aea5ce7243 (diff) |
Add feature tags to signify engine float precision
Diffstat (limited to 'core/os')
-rw-r--r-- | core/os/os.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp index 055385579f..6d567ffd43 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -374,6 +374,16 @@ bool OS::has_feature(const String &p_feature) { #endif // DEBUG_ENABLED #endif // TOOLS_ENABLED +#ifdef REAL_T_IS_DOUBLE + if (p_feature == "double") { + return true; + } +#else + if (p_feature == "single") { + return true; + } +#endif // REAL_T_IS_DOUBLE + if (sizeof(void *) == 8 && p_feature == "64") { return true; } |