diff options
| author | Zach Hilman <zachhilman@gmail.com> | 2018-08-18 21:28:17 -0400 |
|---|---|---|
| committer | Zach Hilman <zachhilman@gmail.com> | 2018-08-18 21:28:23 -0400 |
| commit | 27da7bc9daf951bce69970881bdbc8719378ca39 (patch) | |
| tree | 67fb66ecb4ab97f2036712eb5b75216f75e730bf /src/core/hle/service/filesystem/filesystem.cpp | |
| parent | 367feaefa04679b009941054a4bad58aa9ef6b01 (diff) | |
filesystem: Add support for loading of system archives
Diffstat (limited to 'src/core/hle/service/filesystem/filesystem.cpp')
| -rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index da658cbe6..f374111c1 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -256,15 +256,28 @@ ResultCode RegisterBIS(std::unique_ptr<FileSys::BISFactory>&& factory) { return RESULT_SUCCESS; } -ResultVal<FileSys::VirtualFile> OpenRomFS(u64 title_id) { - LOG_TRACE(Service_FS, "Opening RomFS for title_id={:016X}", title_id); +ResultVal<FileSys::VirtualFile> OpenRomFSCurrentProcess() { + LOG_TRACE(Service_FS, "Opening RomFS for current process"); if (romfs_factory == nullptr) { // TODO(bunnei): Find a better error code for this return ResultCode(-1); } - return romfs_factory->Open(title_id); + return romfs_factory->OpenCurrentProcess(); +} + +ResultVal<FileSys::VirtualFile> OpenRomFS(u64 title_id, FileSys::StorageId storage_id, + FileSys::ContentRecordType type) { + LOG_TRACE(Service_FS, "Opening RomFS for title_id={:016X}, storage_id={:02X}, type={:02X}", + title_id, static_cast<u8>(storage_id), static_cast<u8>(type)); + + if (romfs_factory == nullptr) { + // TODO(bunnei): Find a better error code for this + return ResultCode(-1); + } + + return romfs_factory->Open(title_id, storage_id, type); } ResultVal<FileSys::VirtualDir> OpenSaveData(FileSys::SaveDataSpaceId space, |
