mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-01 04:10:30 +00:00
Create parent directories when saving new textures.
This commit is contained in:
parent
bfda12fa23
commit
5840338397
@ -319,6 +319,19 @@ void TextureReplacer::NotifyTextureDecoded(const ReplacedTextureDecodeInfo &repl
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
size_t slash = hashfile.find_last_of("/\\");
|
||||
#else
|
||||
size_t slash = hashfile.find_last_of("/");
|
||||
#endif
|
||||
if (slash != hashfile.npos) {
|
||||
// Create any directory structure as needed.
|
||||
const std::string saveDirectory = basePath_ + NEW_TEXTURE_DIR + hashfile.substr(0, slash);
|
||||
if (!File::Exists(saveDirectory)) {
|
||||
File::CreateFullPath(saveDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
// Only save the hashed portion of the PNG.
|
||||
int lookupW = w / replacedInfo.scaleFactor;
|
||||
int lookupH = h / replacedInfo.scaleFactor;
|
||||
|
Loading…
Reference in New Issue
Block a user