diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-09-24 03:50:16 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-09-24 03:50:20 +0200 |
commit | b3c2ec362bbbdd89da9c0aa84b425717f5e3d351 (patch) | |
tree | d3f4e621532f1f280f94bac4e6d071707aabbd35 /src/core/file_sys/registered_cache.cpp | |
parent | qt: Add UI elements for LayeredFS and related tools (diff) | |
download | yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.gz yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.bz2 yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.lz yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.xz yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.zst yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.zip |
Diffstat (limited to 'src/core/file_sys/registered_cache.cpp')
-rw-r--r-- | src/core/file_sys/registered_cache.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index 0dda0b861..653ef2e7b 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -18,6 +18,10 @@ #include "core/loader/loader.h" namespace FileSys { + +// The size of blocks to use when vfs raw copying into nand. +constexpr size_t VFS_RC_LARGE_COPY_BLOCK = 0x400000; + std::string RegisteredCacheEntry::DebugInfo() const { return fmt::format("title_id={:016X}, content_type={:02X}", title_id, static_cast<u8>(type)); } @@ -121,7 +125,7 @@ VirtualFile RegisteredCache::OpenFileOrDirectoryConcat(const VirtualDir& dir, if (concat.empty()) return nullptr; - file = FileSys::ConcatenateFiles(concat); + file = FileSys::ConcatenateFiles(concat, concat.front()->GetName()); } return file; @@ -480,7 +484,8 @@ InstallResult RegisteredCache::RawInstallNCA(std::shared_ptr<NCA> nca, const Vfs auto out = dir->CreateFileRelative(path); if (out == nullptr) return InstallResult::ErrorCopyFailed; - return copy(in, out, 0x400000) ? InstallResult::Success : InstallResult::ErrorCopyFailed; + return copy(in, out, VFS_RC_LARGE_COPY_BLOCK) ? InstallResult::Success + : InstallResult::ErrorCopyFailed; } bool RegisteredCache::RawInstallYuzuMeta(const CNMT& cnmt) { |