diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-15 23:46:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-15 23:46:10 +0100 |
commit | 97605e36f7c572d144a8c8f0a5e1beb8ca2b0f51 (patch) | |
tree | c6f69e9269a8e6c4771b1fb338c2677d62f7c48e /src/core/hle/service/filesystem/filesystem.cpp | |
parent | Merge pull request #1691 from lioncash/audren (diff) | |
parent | patch_manager: Add support for dumping decompressed NSOs (diff) | |
download | yuzu-97605e36f7c572d144a8c8f0a5e1beb8ca2b0f51.tar yuzu-97605e36f7c572d144a8c8f0a5e1beb8ca2b0f51.tar.gz yuzu-97605e36f7c572d144a8c8f0a5e1beb8ca2b0f51.tar.bz2 yuzu-97605e36f7c572d144a8c8f0a5e1beb8ca2b0f51.tar.lz yuzu-97605e36f7c572d144a8c8f0a5e1beb8ca2b0f51.tar.xz yuzu-97605e36f7c572d144a8c8f0a5e1beb8ca2b0f51.tar.zst yuzu-97605e36f7c572d144a8c8f0a5e1beb8ca2b0f51.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, 21 insertions, 4 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index ea8fd965a..a92cf7815 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -370,6 +370,15 @@ FileSys::VirtualDir GetModificationLoadRoot(u64 title_id) { return bis_factory->GetModificationLoadRoot(title_id); } +FileSys::VirtualDir GetModificationDumpRoot(u64 title_id) { + LOG_TRACE(Service_FS, "Opening mod dump root for tid={:016X}", title_id); + + if (bis_factory == nullptr) + return nullptr; + + return bis_factory->GetModificationDumpRoot(title_id); +} + void CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) { if (overwrite) { bis_factory = nullptr; @@ -383,13 +392,21 @@ void CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) { FileSys::Mode::ReadWrite); auto load_directory = vfs.OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::LoadDir), FileSys::Mode::ReadWrite); + auto dump_directory = vfs.OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::DumpDir), + FileSys::Mode::ReadWrite); - if (bis_factory == nullptr) - bis_factory = std::make_unique<FileSys::BISFactory>(nand_directory, load_directory); - if (save_data_factory == nullptr) + if (bis_factory == nullptr) { + bis_factory = + std::make_unique<FileSys::BISFactory>(nand_directory, load_directory, dump_directory); + } + + if (save_data_factory == nullptr) { save_data_factory = std::make_unique<FileSys::SaveDataFactory>(std::move(nand_directory)); - if (sdmc_factory == nullptr) + } + + if (sdmc_factory == nullptr) { sdmc_factory = std::make_unique<FileSys::SDMCFactory>(std::move(sd_directory)); + } } void InstallInterfaces(SM::ServiceManager& service_manager, FileSys::VfsFilesystem& vfs) { |