diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-08-16 23:07:37 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-08-23 17:53:30 +0200 |
commit | 8b52d6682a00d2d0ac025433f034d9974584c630 (patch) | |
tree | 7b9ac7a33a267f98856d6c09066e58940b5c590e /src/core/file_sys/registered_cache.cpp | |
parent | sdmc_factory: Add SDMC RegisteredCache getter (diff) | |
download | yuzu-8b52d6682a00d2d0ac025433f034d9974584c630.tar yuzu-8b52d6682a00d2d0ac025433f034d9974584c630.tar.gz yuzu-8b52d6682a00d2d0ac025433f034d9974584c630.tar.bz2 yuzu-8b52d6682a00d2d0ac025433f034d9974584c630.tar.lz yuzu-8b52d6682a00d2d0ac025433f034d9974584c630.tar.xz yuzu-8b52d6682a00d2d0ac025433f034d9974584c630.tar.zst yuzu-8b52d6682a00d2d0ac025433f034d9974584c630.zip |
Diffstat (limited to 'src/core/file_sys/registered_cache.cpp')
-rw-r--r-- | src/core/file_sys/registered_cache.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index e90dc6695..a128fa33d 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -262,6 +262,18 @@ bool RegisteredCache::HasEntry(RegisteredCacheEntry entry) const { return GetEntryRaw(entry) != nullptr; } +VirtualFile RegisteredCache::GetEntryUnparsed(u64 title_id, ContentRecordType type) const { + const auto id = GetNcaIDFromMetadata(title_id, type); + if (id == boost::none) + return nullptr; + + return GetFileAtID(id.get()); +} + +VirtualFile RegisteredCache::GetEntryUnparsed(RegisteredCacheEntry entry) const { + return GetEntryUnparsed(entry.title_id, entry.type); +} + VirtualFile RegisteredCache::GetEntryRaw(u64 title_id, ContentRecordType type) const { const auto id = GetNcaIDFromMetadata(title_id, type); if (id == boost::none) |