aboutsummaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authornekle <nekle@protonmail.com>2026-03-05 00:56:25 +0100
committercrueter <crueter@eden-emu.dev>2026-03-05 00:56:25 +0100
commit70c1e9abed3dc70284c4eece3786922b2fc144ed (patch)
treec86ce670f9c9ce7c0d4a35c96f3cef2258c16a69 /src/android
parent69e47bd2c0c04e0e18c29a23533e8e7724436226 (diff)
[android] Try and fix SD Card storage mount points for external paths (#3436)
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3436 Reviewed-by: DraVee <chimera@dravee.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: nekle <nekle@protonmail.com> Co-committed-by: nekle <nekle@protonmail.com>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/PathUtil.kt16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/PathUtil.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/PathUtil.kt
index a840b3b846..744e1d149c 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/PathUtil.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/PathUtil.kt
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
package org.yuzu.yuzu_emu.utils
@@ -80,16 +80,14 @@ object PathUtil {
}
}
- // This really shouldn't be necessary, but the Android API seemingly
- // doesn't have a way of doing this?
- // Apparently, on certain devices the mount location can vary, so add
- // extra cases here if we discover any new ones.
fun getRemovableStoragePath(idString: String): String? {
- var pathFile: File
+ val possibleMountPaths = listOf("/mnt/media_rw/$idString", "/storage/$idString")
- pathFile = File("/mnt/media_rw/$idString");
- if (pathFile.exists()) {
- return pathFile.absolutePath
+ for (mountPath in possibleMountPaths) {
+ val pathFile = File(mountPath);
+ if (pathFile.exists()) {
+ return pathFile.absolutePath
+ }
}
return null