summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem/filesystem.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-08-19 03:28:17 +0200
committerZach Hilman <zachhilman@gmail.com>2018-08-19 03:28:23 +0200
commit27da7bc9daf951bce69970881bdbc8719378ca39 (patch)
tree67fb66ecb4ab97f2036712eb5b75216f75e730bf /src/core/hle/service/filesystem/filesystem.cpp
parentMerge pull request #838 from FearlessTobi/port-3616 (diff)
downloadyuzu-27da7bc9daf951bce69970881bdbc8719378ca39.tar
yuzu-27da7bc9daf951bce69970881bdbc8719378ca39.tar.gz
yuzu-27da7bc9daf951bce69970881bdbc8719378ca39.tar.bz2
yuzu-27da7bc9daf951bce69970881bdbc8719378ca39.tar.lz
yuzu-27da7bc9daf951bce69970881bdbc8719378ca39.tar.xz
yuzu-27da7bc9daf951bce69970881bdbc8719378ca39.tar.zst
yuzu-27da7bc9daf951bce69970881bdbc8719378ca39.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp19
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,