summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2018-08-20 10:01:50 +0200
committerGitHub <noreply@github.com>2018-08-20 10:01:50 +0200
commit3c354d9280ec94234f4cdcdfe4e9d91cf56517f3 (patch)
tree2c61cc34e76fbe245bfba9236407614eebb88e75 /Source
parentc3b0208de641669b7df9b924da3d75beb733be9e (diff)
parenteefef731414555d08e82a6471e4bd37ed02a09ac (diff)
Merge pull request #7333 from weihuoya/gamecover-nomedia
Hide game cover in android gallery
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/CommonPaths.h1
-rw-r--r--Source/Core/UICommon/UICommon.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/Common/CommonPaths.h b/Source/Core/Common/CommonPaths.h
index 0977f96a9e..7daeebe630 100644
--- a/Source/Core/Common/CommonPaths.h
+++ b/Source/Core/Common/CommonPaths.h
@@ -22,6 +22,7 @@
#elif defined ANDROID
#define USERDATA_DIR "user"
#define DOLPHIN_DATA_DIR "/sdcard/dolphin-emu"
+#define NOMEDIA_FILE ".nomedia"
#else
#define USERDATA_DIR "user"
#define DOLPHIN_DATA_DIR "dolphin-emu"
diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp
index 2055c4d863..66f8642a9a 100644
--- a/Source/Core/UICommon/UICommon.cpp
+++ b/Source/Core/UICommon/UICommon.cpp
@@ -178,6 +178,9 @@ void CreateDirectories()
#ifndef ANDROID
File::CreateFullPath(File::GetUserPath(D_THEMES_IDX));
File::CreateFullPath(File::GetUserPath(D_STYLES_IDX));
+#else
+ // Disable media scanning in directories with a .nomedia file
+ File::CreateEmptyFile(File::GetUserPath(D_COVERCACHE_IDX) + DIR_SEP NOMEDIA_FILE);
#endif
}