diff options
| author | bunnei <bunneidev@gmail.com> | 2020-12-15 11:07:03 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-15 11:07:03 -0800 |
| commit | 2e1b998d5ed676f7d637916a40118450cf0599a1 (patch) | |
| tree | 77e254b90270dcf28052d79bd6fdddfa9c77783c /src/core/hle/service/filesystem/filesystem.cpp | |
| parent | 37bec068c2e3814bf23f1b8c1c6dd00d80191d27 (diff) | |
| parent | e15039372ea63efb37cdaa70833b2d080931ee3c (diff) | |
Merge pull request #5119 from Morph1984/fs-opendatastoragewithprogramindex
fsp_srv: Implement OpenDataStorageWithProgramIndex
Diffstat (limited to 'src/core/hle/service/filesystem/filesystem.cpp')
| -rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 25 |
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}", |
