diff options
author | Juan Linietsky <juan@godotengine.org> | 2019-02-26 11:58:47 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2019-02-26 11:58:47 -0300 |
commit | 5eeb06ffd1bf9cc79142760c372c17cd858cbe49 (patch) | |
tree | 824bdca6e0072ff877a1944c5b2c248c2bca0fbb /core/os/os.cpp | |
parent | 329904598829dcbed462b012dee39bc37d7d7c83 (diff) |
-Remove harcoded opengl extension testing from OS, ask rasterizer instead.
-Fixed a bug where etc textures were imported broken
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r-- | core/os/os.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp index d2d39d253a..03e63f636e 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -569,6 +569,11 @@ int OS::get_power_percent_left() { return -1; } +void OS::set_has_server_feature_callback(HasServerFeatureCallback p_callback) { + + has_server_feature_callback = p_callback; +} + bool OS::has_feature(const String &p_feature) { if (p_feature == get_name()) @@ -625,6 +630,10 @@ bool OS::has_feature(const String &p_feature) { if (_check_internal_feature_support(p_feature)) return true; + if (has_server_feature_callback && has_server_feature_callback(p_feature)) { + return true; + } + if (ProjectSettings::get_singleton()->has_custom_feature(p_feature)) return true; @@ -729,6 +738,8 @@ OS::OS() { _logger = NULL; + has_server_feature_callback = NULL; + Vector<Logger *> loggers; loggers.push_back(memnew(StdLogger)); _set_logger(memnew(CompositeLogger(loggers))); |