From 410062031b0c29d63abb21e1b9ce70b4b700ae8f Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Thu, 16 Aug 2018 17:03:31 -0400 Subject: filesystem: Add logging to registration getters --- src/core/hle/service/filesystem/filesystem.cpp | 29 ++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'src') 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 OpenSDMC() { } std::shared_ptr GetSystemNANDContents() { + LOG_TRACE(Service_FS, "Opening System NAND Contents"); + + if (bis_factory == nullptr) + return nullptr; + return bis_factory->GetSystemNANDContents(); } std::shared_ptr 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 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); -- cgit v1.2.3