diff options
author | Lioncash <mathew1800@gmail.com> | 2018-12-02 02:32:38 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-12-02 05:43:23 +0100 |
commit | db4523f1ece642475d58f8764863c8930a0812e3 (patch) | |
tree | 53a96ed05770f77a1dd9bb463863c38e3dffa36c /src/core/hle/service/filesystem/filesystem.cpp | |
parent | Fix debug build (diff) | |
download | yuzu-db4523f1ece642475d58f8764863c8930a0812e3.tar yuzu-db4523f1ece642475d58f8764863c8930a0812e3.tar.gz yuzu-db4523f1ece642475d58f8764863c8930a0812e3.tar.bz2 yuzu-db4523f1ece642475d58f8764863c8930a0812e3.tar.lz yuzu-db4523f1ece642475d58f8764863c8930a0812e3.tar.xz yuzu-db4523f1ece642475d58f8764863c8930a0812e3.tar.zst yuzu-db4523f1ece642475d58f8764863c8930a0812e3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index 2aa77f68d..dbef3b2e4 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -329,20 +329,9 @@ ResultVal<FileSys::VirtualDir> OpenSDMC() { return sdmc_factory->Open(); } -std::shared_ptr<FileSys::RegisteredCacheUnion> registered_cache_union; - -std::shared_ptr<FileSys::RegisteredCacheUnion> GetUnionContents() { - if (registered_cache_union == nullptr) { - registered_cache_union = - std::make_shared<FileSys::RegisteredCacheUnion>(std::vector<FileSys::RegisteredCache*>{ - GetSystemNANDContents(), GetUserNANDContents(), GetSDMCContents()}); - } - - return registered_cache_union; -} - -void ClearUnionContents() { - registered_cache_union = nullptr; +FileSys::RegisteredCacheUnion GetUnionContents() { + return FileSys::RegisteredCacheUnion{ + {GetSystemNANDContents(), GetUserNANDContents(), GetSDMCContents()}}; } FileSys::RegisteredCache* GetSystemNANDContents() { @@ -395,7 +384,6 @@ void CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) { bis_factory = nullptr; save_data_factory = nullptr; sdmc_factory = nullptr; - ClearUnionContents(); } auto nand_directory = vfs.OpenDirectory(FileUtil::GetUserPath(FileUtil::UserPath::NANDDir), |