From 2fac523e10776e2b0bae9e0757d5d9cafd5d61c9 Mon Sep 17 00:00:00 2001 From: weihuoya Date: Wed, 15 Aug 2018 16:37:00 +0800 Subject: [PATCH] hide game cover in android gallery --- Source/Core/Common/CommonPaths.h | 1 + Source/Core/UICommon/UICommon.cpp | 2 ++ 2 files changed, 3 insertions(+) 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..db854dd7e4 100644 --- a/Source/Core/UICommon/UICommon.cpp +++ b/Source/Core/UICommon/UICommon.cpp @@ -178,6 +178,8 @@ void CreateDirectories() #ifndef ANDROID File::CreateFullPath(File::GetUserPath(D_THEMES_IDX)); File::CreateFullPath(File::GetUserPath(D_STYLES_IDX)); +#else + File::CreateEmptyFile(File::GetUserPath(D_COVERCACHE_IDX) + DIR_SEP NOMEDIA_FILE); #endif }