aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/registered_cache.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-08-16 17:07:37 -0400
committerZach Hilman <zachhilman@gmail.com>2018-08-23 11:53:30 -0400
commitd407472129ff9ff0acbabe6bd564a8413b3912eb (patch)
tree7b9ac7a33a267f98856d6c09066e58940b5c590e /src/core/file_sys/registered_cache.cpp
parent8bc95b876e1acbe003dcaeea2421abdaeff6763e (diff)
registration: Add GetEntryUnparsed methods
Returns the file before calling parser on it.
Diffstat (limited to 'src/core/file_sys/registered_cache.cpp')
-rw-r--r--src/core/file_sys/registered_cache.cpp12
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 e90dc66953..a128fa33d4 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)