mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 11:03:13 -05:00
Merge pull request #99310 from syntaxerror247/filedialog_issue
Android: Set default ACCESS_FILESYSTEM root
This commit is contained in:
commit
6472e9e961
1 changed files with 7 additions and 3 deletions
|
@ -1114,9 +1114,16 @@ void FileDialog::set_access(Access p_access) {
|
|||
if (access == p_access) {
|
||||
return;
|
||||
}
|
||||
access = p_access;
|
||||
root_prefix = "";
|
||||
root_subfolder = "";
|
||||
|
||||
switch (p_access) {
|
||||
case ACCESS_FILESYSTEM: {
|
||||
dir_access = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
||||
#ifdef ANDROID_ENABLED
|
||||
set_root_subfolder(OS::get_singleton()->get_system_dir(OS::SYSTEM_DIR_DESKTOP));
|
||||
#endif
|
||||
} break;
|
||||
case ACCESS_RESOURCES: {
|
||||
dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
|
@ -1125,9 +1132,6 @@ void FileDialog::set_access(Access p_access) {
|
|||
dir_access = DirAccess::create(DirAccess::ACCESS_USERDATA);
|
||||
} break;
|
||||
}
|
||||
access = p_access;
|
||||
root_prefix = "";
|
||||
root_subfolder = "";
|
||||
_update_drives();
|
||||
invalidate();
|
||||
update_filters();
|
||||
|
|
Loading…
Add table
Reference in a new issue