Permalink
Browse files

Android: Add .nomedia files to system and textures.

Due it on all platforms when saving textures to encourage including
.nomedia in texture packs.
  • Loading branch information...
unknownbrackets committed Sep 2, 2018
1 parent a004196 commit d1c566861250cca52f7f47eeed310e91c0053cd5
Showing with 3 additions and 0 deletions.
  1. +2 −0 Core/TextureReplacer.cpp
  2. +1 −0 UI/NativeApp.cpp
View
@@ -58,6 +58,7 @@ void TextureReplacer::NotifyConfigChanged() {
// If we're saving, auto-create the directory.
if (g_Config.bSaveNewTextures && !File::Exists(basePath_ + NEW_TEXTURE_DIR)) {
File::CreateFullPath(basePath_ + NEW_TEXTURE_DIR);
File::CreateEmptyFile(basePath_ + NEW_TEXTURE_DIR + "/.nomedia");
}
enabled_ = File::Exists(basePath_) && File::IsDirectory(basePath_);
@@ -400,6 +401,7 @@ void TextureReplacer::NotifyTextureDecoded(const ReplacedTextureDecodeInfo &repl
const std::string saveDirectory = basePath_ + NEW_TEXTURE_DIR + hashfile.substr(0, slash);
if (!File::Exists(saveDirectory)) {
File::CreateFullPath(saveDirectory);
File::CreateEmptyFile(saveDirectory + "/.nomedia");
}
}
View
@@ -345,6 +345,7 @@ void CreateDirectoriesAndroid() {
// Avoid media scanners in PPSSPP_STATE and SAVEDATA directories
File::CreateEmptyFile(g_Config.memStickDirectory + "PSP/PPSSPP_STATE/.nomedia");
File::CreateEmptyFile(g_Config.memStickDirectory + "PSP/SAVEDATA/.nomedia");
File::CreateEmptyFile(GetSysDirectory(DIRECTORY_SYSTEM) + ".nomedia");
}
void NativeInit(int argc, const char *argv[], const char *savegame_dir, const char *external_dir, const char *cache_dir) {

0 comments on commit d1c5668

Please sign in to comment.