summaryrefslogtreecommitdiffstats
path: root/platform/android/os_android.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 /platform/android/os_android.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 'platform/android/os_android.cpp')
-rw-r--r--platform/android/os_android.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 725fea8d54..1ea742dc6d 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -311,7 +311,11 @@ String OS_Android::get_resource_dir() const {
#ifdef TOOLS_ENABLED
return OS_Unix::get_resource_dir();
#else
- return "/"; //android has its own filesystem for resources inside the APK
+ if (remote_fs_dir.is_empty()) {
+ return "/"; // Android has its own filesystem for resources inside the APK
+ } else {
+ return remote_fs_dir;
+ }
#endif
}
@@ -753,5 +757,15 @@ Error OS_Android::kill(const ProcessID &p_pid) {
return OS_Unix::kill(p_pid);
}
+Error OS_Android::setup_remote_filesystem(const String &p_server_host, int p_port, const String &p_password, String &r_project_path) {
+ r_project_path = get_user_data_dir();
+ Error err = OS_Unix::setup_remote_filesystem(p_server_host, p_port, p_password, r_project_path);
+ if (err == OK) {
+ remote_fs_dir = r_project_path;
+ FileAccess::make_default<FileAccessFilesystemJAndroid>(FileAccess::ACCESS_RESOURCES);
+ }
+ return err;
+}
+
OS_Android::~OS_Android() {
}