diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 13 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/filesystem.h | 2 |
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() { | |||
| 343 | return sdmc_factory->GetSDMCContents(); | 343 | return sdmc_factory->GetSDMCContents(); |
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | FileSys::VirtualDir GetModificationLoadRoot(u64 title_id) { | ||
| 347 | LOG_TRACE(Service_FS, "Opening mod load root for tid={:016X}", title_id); | ||
| 348 | |||
| 349 | if (bis_factory == nullptr) | ||
| 350 | return nullptr; | ||
| 351 | |||
| 352 | return bis_factory->GetModificationLoadRoot(title_id); | ||
| 353 | } | ||
| 354 | |||
| 346 | void CreateFactories(const FileSys::VirtualFilesystem& vfs, bool overwrite) { | 355 | void CreateFactories(const FileSys::VirtualFilesystem& vfs, bool overwrite) { |
| 347 | if (overwrite) { | 356 | if (overwrite) { |
| 348 | bis_factory = nullptr; | 357 | bis_factory = nullptr; |
| @@ -354,9 +363,11 @@ void CreateFactories(const FileSys::VirtualFilesystem& vfs, bool overwrite) { | |||
| 354 | FileSys::Mode::ReadWrite); | 363 | FileSys::Mode::ReadWrite); |
| 355 | auto sd_directory = vfs->OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir), | 364 | auto sd_directory = vfs->OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir), |
| 356 | FileSys::Mode::ReadWrite); | 365 | FileSys::Mode::ReadWrite); |
| 366 | auto load_directory = vfs->OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::LoadDir), | ||
| 367 | FileSys::Mode::ReadWrite); | ||
| 357 | 368 | ||
| 358 | if (bis_factory == nullptr) | 369 | if (bis_factory == nullptr) |
| 359 | bis_factory = std::make_unique<FileSys::BISFactory>(nand_directory); | 370 | bis_factory = std::make_unique<FileSys::BISFactory>(nand_directory, load_directory); |
| 360 | if (save_data_factory == nullptr) | 371 | if (save_data_factory == nullptr) |
| 361 | save_data_factory = std::make_unique<FileSys::SaveDataFactory>(std::move(nand_directory)); | 372 | save_data_factory = std::make_unique<FileSys::SaveDataFactory>(std::move(nand_directory)); |
| 362 | if (sdmc_factory == nullptr) | 373 | 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(); | |||
| 52 | std::shared_ptr<FileSys::RegisteredCache> GetUserNANDContents(); | 52 | std::shared_ptr<FileSys::RegisteredCache> GetUserNANDContents(); |
| 53 | std::shared_ptr<FileSys::RegisteredCache> GetSDMCContents(); | 53 | std::shared_ptr<FileSys::RegisteredCache> GetSDMCContents(); |
| 54 | 54 | ||
| 55 | FileSys::VirtualDir GetModificationLoadRoot(u64 title_id); | ||
| 56 | |||
| 55 | // Creates the SaveData, SDMC, and BIS Factories. Should be called once and before any function | 57 | // Creates the SaveData, SDMC, and BIS Factories. Should be called once and before any function |
| 56 | // above is called. | 58 | // above is called. |
| 57 | void CreateFactories(const FileSys::VirtualFilesystem& vfs, bool overwrite = true); | 59 | void CreateFactories(const FileSys::VirtualFilesystem& vfs, bool overwrite = true); |