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

Fix OS::has_feature() skipping custom features #99864

Merged
Merged
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
9 changes: 2 additions & 7 deletions core/os/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,14 +536,9 @@ bool OS::has_feature(const String &p_feature) {
return true;
}

if (has_server_feature_callback) {
return has_server_feature_callback(p_feature);
}
#ifdef DEBUG_ENABLED
else if (is_stdout_verbose()) {
WARN_PRINT_ONCE("Server features cannot be checked before RenderingServer has been created. If you are checking a server feature, consider moving your OS::has_feature call after INITIALIZATION_LEVEL_SERVERS.");
if (has_server_feature_callback && has_server_feature_callback(p_feature)) {
return true;
}
#endif

if (ProjectSettings::get_singleton()->has_custom_feature(p_feature)) {
return true;
Expand Down