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 | |
parent | a7937fe54cd2c1f407a529e46e2708aea5ce7243 (diff) |
Add feature tags to signify engine float precision
-rw-r--r-- | core/os/os.cpp | 10 | ||||
-rw-r--r-- | editor/project_settings_editor.cpp | 2 |
2 files changed, 12 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; } diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 1e917e6b3d..b406b2a1ce 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -280,6 +280,8 @@ void ProjectSettingsEditor::_add_feature_overrides() { presets.insert("debug"); presets.insert("release"); presets.insert("template"); + presets.insert("double"); + presets.insert("single"); presets.insert("32"); presets.insert("64"); presets.insert("movie"); |