Fixed OS.has_feature not using custom feature tags.
(cherry picked from commit 25e64ffa20
)
This commit is contained in:
parent
fd5dca2689
commit
c68a465f47
|
@ -613,6 +613,9 @@ bool OS::has_feature(const String &p_feature) {
|
|||
if (_check_internal_feature_support(p_feature))
|
||||
return true;
|
||||
|
||||
if (ProjectSettings::get_singleton()->has_custom_feature(p_feature))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -886,6 +886,10 @@ Variant ProjectSettings::get_setting(const String &p_setting) const {
|
|||
return get(p_setting);
|
||||
}
|
||||
|
||||
bool ProjectSettings::has_custom_feature(const String &p_feature) const {
|
||||
return custom_features.has(p_feature);
|
||||
}
|
||||
|
||||
void ProjectSettings::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("has_setting", "name"), &ProjectSettings::has_setting);
|
||||
|
|
|
@ -148,6 +148,8 @@ public:
|
|||
|
||||
void set_registering_order(bool p_enable);
|
||||
|
||||
bool has_custom_feature(const String &p_feature) const;
|
||||
|
||||
ProjectSettings();
|
||||
~ProjectSettings();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue