diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-12-04 04:57:28 +0100 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-12-08 14:19:05 +0100 |
commit | e15039372ea63efb37cdaa70833b2d080931ee3c (patch) | |
tree | 978997c532d32f3861ab25e06d128ddcaad65a0f /src/core/hle/service/filesystem/filesystem.cpp | |
parent | file_sys: Consolidate common Title ID operations (diff) | |
download | yuzu-e15039372ea63efb37cdaa70833b2d080931ee3c.tar yuzu-e15039372ea63efb37cdaa70833b2d080931ee3c.tar.gz yuzu-e15039372ea63efb37cdaa70833b2d080931ee3c.tar.bz2 yuzu-e15039372ea63efb37cdaa70833b2d080931ee3c.tar.lz yuzu-e15039372ea63efb37cdaa70833b2d080931ee3c.tar.xz yuzu-e15039372ea63efb37cdaa70833b2d080931ee3c.tar.zst yuzu-e15039372ea63efb37cdaa70833b2d080931ee3c.zip |
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 ca93062cf..0e9e06267 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}", |