From f8b87e6fabc9f9f202a7eb35f13d997165b9f94c Mon Sep 17 00:00:00 2001
From: bunnei <bunneidev@gmail.com>
Date: Sat, 17 Dec 2022 23:33:09 -0800
Subject: [PATCH] common: fs: Implement for Android.

---
 src/common/fs/path_util.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp
index defa3e918..ca755b053 100644
--- a/src/common/fs/path_util.cpp
+++ b/src/common/fs/path_util.cpp
@@ -95,6 +95,13 @@ private:
 
         yuzu_path_cache = yuzu_path / CACHE_DIR;
         yuzu_path_config = yuzu_path / CONFIG_DIR;
+#elif ANDROID
+        // On Android internal storage is mounted as "/sdcard"
+        if (Exists("/sdcard")) {
+            yuzu_path = "/sdcard/yuzu-emu";
+            yuzu_path_cache = yuzu_path / CACHE_DIR;
+            yuzu_path_config = yuzu_path / CONFIG_DIR;
+        }
 #else
         yuzu_path = GetCurrentDir() / PORTABLE_DIR;