summaryrefslogtreecommitdiffstats
path: root/core/os/os.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-05-08 13:52:51 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-05-08 13:52:51 +0200
commit491a437df51192f76ac19cee1ba2001365697cc4 (patch)
treeada1019b3c7351a5ca6daf38273490a6a145a79c /core/os/os.cpp
parentc9f81045be9760820a1bb4898f08d2ff9784d4b7 (diff)
parent273a6eeb66ed1ff2fcc1ee3a6eaae4eedf437875 (diff)
downloadredot-engine-491a437df51192f76ac19cee1ba2001365697cc4.tar.gz
Merge pull request #76540 from reduz/redo-remote-filesystem
Redo how the remote filesystem works
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r--core/os/os.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index c82f87c731..4123a1d602 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -72,6 +72,10 @@ void OS::add_logger(Logger *p_logger) {
}
}
+String OS::get_identifier() const {
+ return get_name().to_lower();
+}
+
void OS::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, bool p_editor_notify, Logger::ErrorType p_type) {
if (!_stderr_enabled) {
return;
@@ -357,13 +361,7 @@ void OS::set_has_server_feature_callback(HasServerFeatureCallback p_callback) {
bool OS::has_feature(const String &p_feature) {
// Feature tags are always lowercase for consistency.
- if (p_feature == get_name().to_lower()) {
- return true;
- }
-
- // Catch-all `linuxbsd` feature tag that matches on both Linux and BSD.
- // This is the one exposed in the project settings dialog.
- if (p_feature == "linuxbsd" && (get_name() == "Linux" || get_name() == "FreeBSD" || get_name() == "NetBSD" || get_name() == "OpenBSD" || get_name() == "BSD")) {
+ if (p_feature == get_identifier()) {
return true;
}
@@ -569,6 +567,10 @@ void OS::add_frame_delay(bool p_can_draw) {
}
}
+Error OS::setup_remote_filesystem(const String &p_server_host, int p_port, const String &p_password, String &r_project_path) {
+ return default_rfs.synchronize_with_server(p_server_host, p_port, p_password, r_project_path);
+}
+
OS::PreferredTextureFormat OS::get_preferred_texture_format() const {
#if defined(__arm__) || defined(__aarch64__) || defined(_M_ARM) || defined(_M_ARM64)
return PREFERRED_TEXTURE_FORMAT_ETC2_ASTC; // By rule, ARM hardware uses ETC texture compression.