1
0
Fork 0

Fix early exit once has_server_feature_callback is set; remove server feature warning due to consistent "fallthrough" features (e.g., OS-specific features)

This commit is contained in:
Hunt J. Sparra 2024-11-29 23:34:52 -05:00
parent 893bbdfde8
commit ba992ed22f
1 changed files with 2 additions and 7 deletions

View File

@ -536,14 +536,9 @@ bool OS::has_feature(const String &p_feature) {
return true; return true;
} }
if (has_server_feature_callback) { if (has_server_feature_callback && has_server_feature_callback(p_feature)) {
return has_server_feature_callback(p_feature); return true;
} }
#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.");
}
#endif
if (ProjectSettings::get_singleton()->has_custom_feature(p_feature)) { if (ProjectSettings::get_singleton()->has_custom_feature(p_feature)) {
return true; return true;