diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-08-16 23:03:31 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-08-23 17:52:44 +0200 |
commit | 410062031b0c29d63abb21e1b9ce70b4b700ae8f (patch) | |
tree | d8e1c50fa004222b72d2b86c6522fc9fc081b3a5 /src/core/hle/service | |
parent | loader: Add new NAX-specific errors and messages (diff) | |
download | yuzu-410062031b0c29d63abb21e1b9ce70b4b700ae8f.tar yuzu-410062031b0c29d63abb21e1b9ce70b4b700ae8f.tar.gz yuzu-410062031b0c29d63abb21e1b9ce70b4b700ae8f.tar.bz2 yuzu-410062031b0c29d63abb21e1b9ce70b4b700ae8f.tar.lz yuzu-410062031b0c29d63abb21e1b9ce70b4b700ae8f.tar.xz yuzu-410062031b0c29d63abb21e1b9ce70b4b700ae8f.tar.zst yuzu-410062031b0c29d63abb21e1b9ce70b4b700ae8f.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index 6f9c64263..1a318b233 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -305,17 +305,38 @@ ResultVal<FileSys::VirtualDir> OpenSDMC() { } std::shared_ptr<FileSys::RegisteredCache> GetSystemNANDContents() { + LOG_TRACE(Service_FS, "Opening System NAND Contents"); + + if (bis_factory == nullptr) + return nullptr; + return bis_factory->GetSystemNANDContents(); } std::shared_ptr<FileSys::RegisteredCache> GetUserNANDContents() { + LOG_TRACE(Service_FS, "Opening User NAND Contents"); + + if (bis_factory == nullptr) + return nullptr; + return bis_factory->GetUserNANDContents(); } -void RegisterFileSystems(const FileSys::VirtualFilesystem& vfs) { - romfs_factory = nullptr; - save_data_factory = nullptr; - sdmc_factory = nullptr; +std::shared_ptr<FileSys::RegisteredCache> GetSDMCContents() { + LOG_TRACE(Service_FS, "Opening SDMC Contents"); + + if (sdmc_factory == nullptr) + return nullptr; + + return sdmc_factory->GetSDMCContents(); +} + +void CreateFactories(const FileSys::VirtualFilesystem& vfs, bool overwrite) { + if (overwrite) { + bis_factory = nullptr; + save_data_factory = nullptr; + sdmc_factory = nullptr; + } auto nand_directory = vfs->OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::NANDDir), FileSys::Mode::ReadWrite); |