Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature tags to signify engine float precision #69538

Merged
merged 1 commit into from
Dec 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions core/os/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions editor/project_settings_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down