You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Android: Misc changes
This commit is contained in:
@@ -1069,12 +1069,13 @@ void EditorFileSystem::scan() {
|
||||
if (first_scan) {
|
||||
_first_scan_filesystem();
|
||||
#ifdef ANDROID_ENABLED
|
||||
// Create a .nomedia file to hide assets from media apps on Android.
|
||||
// Android 11 has some issues with nomedia files, so it's disabled there. See GH-106479 and GH-105399 for details.
|
||||
// NOTE: Nomedia file is also handled in project manager. See project_dialog.cpp -> ProjectDialog::ok_pressed().
|
||||
String sdk_version = OS::get_singleton()->get_version().get_slicec('.', 0);
|
||||
if (sdk_version != "30") {
|
||||
const String nomedia_file_path = ProjectSettings::get_singleton()->get_resource_path().path_join(".nomedia");
|
||||
if (!FileAccess::exists(nomedia_file_path)) {
|
||||
// Create a .nomedia file to hide assets from media apps on Android.
|
||||
Ref<FileAccess> f = FileAccess::open(nomedia_file_path, FileAccess::WRITE);
|
||||
if (f.is_null()) {
|
||||
// .nomedia isn't so critical.
|
||||
|
||||
Reference in New Issue
Block a user