summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem/romfs_controller.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-01-08 06:49:00 +0100
committerLiam <byteslice@airmail.cc>2024-01-11 17:28:52 +0100
commitaae9eea53208fc0924c90ebb1272fcfaa3f23e0c (patch)
tree050ccc76dd2fad3c3f81197aa6435674caeac86f /src/core/hle/service/filesystem/romfs_controller.cpp
parentMerge pull request #12608 from szepeviktor/typos (diff)
downloadyuzu-aae9eea53208fc0924c90ebb1272fcfaa3f23e0c.tar
yuzu-aae9eea53208fc0924c90ebb1272fcfaa3f23e0c.tar.gz
yuzu-aae9eea53208fc0924c90ebb1272fcfaa3f23e0c.tar.bz2
yuzu-aae9eea53208fc0924c90ebb1272fcfaa3f23e0c.tar.lz
yuzu-aae9eea53208fc0924c90ebb1272fcfaa3f23e0c.tar.xz
yuzu-aae9eea53208fc0924c90ebb1272fcfaa3f23e0c.tar.zst
yuzu-aae9eea53208fc0924c90ebb1272fcfaa3f23e0c.zip
Diffstat (limited to 'src/core/hle/service/filesystem/romfs_controller.cpp')
-rw-r--r--src/core/hle/service/filesystem/romfs_controller.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/romfs_controller.cpp b/src/core/hle/service/filesystem/romfs_controller.cpp
new file mode 100644
index 000000000..19c9cec72
--- /dev/null
+++ b/src/core/hle/service/filesystem/romfs_controller.cpp
@@ -0,0 +1,37 @@
+// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "core/hle/service/filesystem/romfs_controller.h"
+
+namespace Service::FileSystem {
+
+RomFsController::RomFsController(std::shared_ptr<FileSys::RomFSFactory> factory_, u64 program_id_)
+ : factory{std::move(factory_)}, program_id{program_id_} {}
+RomFsController::~RomFsController() = default;
+
+FileSys::VirtualFile RomFsController::OpenRomFSCurrentProcess() {
+ return factory->OpenCurrentProcess(program_id);
+}
+
+FileSys::VirtualFile RomFsController::OpenPatchedRomFS(u64 title_id,
+ FileSys::ContentRecordType type) {
+ return factory->OpenPatchedRomFS(title_id, type);
+}
+
+FileSys::VirtualFile RomFsController::OpenPatchedRomFSWithProgramIndex(
+ u64 title_id, u8 program_index, FileSys::ContentRecordType type) {
+ return factory->OpenPatchedRomFSWithProgramIndex(title_id, program_index, type);
+}
+
+FileSys::VirtualFile RomFsController::OpenRomFS(u64 title_id, FileSys::StorageId storage_id,
+ FileSys::ContentRecordType type) {
+ return factory->Open(title_id, storage_id, type);
+}
+
+std::shared_ptr<FileSys::NCA> RomFsController::OpenBaseNca(u64 title_id,
+ FileSys::StorageId storage_id,
+ FileSys::ContentRecordType type) {
+ return factory->GetEntry(title_id, storage_id, type);
+}
+
+} // namespace Service::FileSystem