summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem/filesystem.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-12-15 20:07:03 +0100
committerGitHub <noreply@github.com>2020-12-15 20:07:03 +0100
commit2e1b998d5ed676f7d637916a40118450cf0599a1 (patch)
tree77e254b90270dcf28052d79bd6fdddfa9c77783c /src/core/hle/service/filesystem/filesystem.cpp
parentMerge pull request #5157 from lioncash/array-dirty (diff)
parentfsp_srv: Implement OpenDataStorageWithProgramIndex (diff)
downloadyuzu-2e1b998d5ed676f7d637916a40118450cf0599a1.tar
yuzu-2e1b998d5ed676f7d637916a40118450cf0599a1.tar.gz
yuzu-2e1b998d5ed676f7d637916a40118450cf0599a1.tar.bz2
yuzu-2e1b998d5ed676f7d637916a40118450cf0599a1.tar.lz
yuzu-2e1b998d5ed676f7d637916a40118450cf0599a1.tar.xz
yuzu-2e1b998d5ed676f7d637916a40118450cf0599a1.tar.zst
yuzu-2e1b998d5ed676f7d637916a40118450cf0599a1.zip
Diffstat (limited to 'src/core/hle/service/filesystem/filesystem.cpp')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 6af818b5a..b15c737e1 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -298,6 +298,31 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFSCurrentProcess()
return romfs_factory->OpenCurrentProcess(system.CurrentProcess()->GetTitleID());
}
+ResultVal<FileSys::VirtualFile> FileSystemController::OpenPatchedRomFS(
+ u64 title_id, FileSys::ContentRecordType type) const {
+ LOG_TRACE(Service_FS, "Opening patched RomFS for title_id={:016X}", title_id);
+
+ if (romfs_factory == nullptr) {
+ // TODO: Find a better error code for this
+ return RESULT_UNKNOWN;
+ }
+
+ return romfs_factory->OpenPatchedRomFS(title_id, type);
+}
+
+ResultVal<FileSys::VirtualFile> FileSystemController::OpenPatchedRomFSWithProgramIndex(
+ u64 title_id, u8 program_index, FileSys::ContentRecordType type) const {
+ LOG_TRACE(Service_FS, "Opening patched RomFS for title_id={:016X}, program_index={}", title_id,
+ program_index);
+
+ if (romfs_factory == nullptr) {
+ // TODO: Find a better error code for this
+ return RESULT_UNKNOWN;
+ }
+
+ return romfs_factory->OpenPatchedRomFSWithProgramIndex(title_id, program_index, type);
+}
+
ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFS(
u64 title_id, FileSys::StorageId storage_id, FileSys::ContentRecordType type) const {
LOG_TRACE(Service_FS, "Opening RomFS for title_id={:016X}, storage_id={:02X}, type={:02X}",