summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-25 22:59:44 +0200
committerGitHub <noreply@github.com>2018-09-25 22:59:44 +0200
commit7b81e1e52565ee867c285e2b0c2526f8d4b82581 (patch)
tree718decad5aae4153d8acaa444058914a1c12f147 /src/core/hle/service
parentMerge pull request #1393 from tech4me/svc (diff)
parentfsmitm: Cleanup and modernize fsmitm port (diff)
downloadyuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar
yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar.gz
yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar.bz2
yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar.lz
yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar.xz
yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar.zst
yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp13
-rw-r--r--src/core/hle/service/filesystem/filesystem.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index d349ee686..aed2abb71 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -343,6 +343,15 @@ std::shared_ptr<FileSys::RegisteredCache> GetSDMCContents() {
return sdmc_factory->GetSDMCContents();
}
+FileSys::VirtualDir GetModificationLoadRoot(u64 title_id) {
+ LOG_TRACE(Service_FS, "Opening mod load root for tid={:016X}", title_id);
+
+ if (bis_factory == nullptr)
+ return nullptr;
+
+ return bis_factory->GetModificationLoadRoot(title_id);
+}
+
void CreateFactories(const FileSys::VirtualFilesystem& vfs, bool overwrite) {
if (overwrite) {
bis_factory = nullptr;
@@ -354,9 +363,11 @@ void CreateFactories(const FileSys::VirtualFilesystem& vfs, bool overwrite) {
FileSys::Mode::ReadWrite);
auto sd_directory = vfs->OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir),
FileSys::Mode::ReadWrite);
+ auto load_directory = vfs->OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::LoadDir),
+ FileSys::Mode::ReadWrite);
if (bis_factory == nullptr)
- bis_factory = std::make_unique<FileSys::BISFactory>(nand_directory);
+ bis_factory = std::make_unique<FileSys::BISFactory>(nand_directory, load_directory);
if (save_data_factory == nullptr)
save_data_factory = std::make_unique<FileSys::SaveDataFactory>(std::move(nand_directory));
if (sdmc_factory == nullptr)
diff --git a/src/core/hle/service/filesystem/filesystem.h b/src/core/hle/service/filesystem/filesystem.h
index aab65a2b8..7039a2247 100644
--- a/src/core/hle/service/filesystem/filesystem.h
+++ b/src/core/hle/service/filesystem/filesystem.h
@@ -52,6 +52,8 @@ std::shared_ptr<FileSys::RegisteredCache> GetSystemNANDContents();
std::shared_ptr<FileSys::RegisteredCache> GetUserNANDContents();
std::shared_ptr<FileSys::RegisteredCache> GetSDMCContents();
+FileSys::VirtualDir GetModificationLoadRoot(u64 title_id);
+
// Creates the SaveData, SDMC, and BIS Factories. Should be called once and before any function
// above is called.
void CreateFactories(const FileSys::VirtualFilesystem& vfs, bool overwrite = true);