summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-04-10 12:32:19 -0400
committerGravatar Zach Hilman2019-09-21 16:43:10 -0400
commit0084cceb203544e306d7089bc81d81e20e1ddafa (patch)
treebd05307331b5d56a146af9c5097cdfff9ffeca8c /src
parentsdmc_factory: Add accessor for content directory (diff)
downloadyuzu-0084cceb203544e306d7089bc81d81e20e1ddafa.tar.gz
yuzu-0084cceb203544e306d7089bc81d81e20e1ddafa.tar.xz
yuzu-0084cceb203544e306d7089bc81d81e20e1ddafa.zip
sdmc_factory: Add accessor for SDMC PlaceholderCache
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/sdmc_factory.cpp8
-rw-r--r--src/core/file_sys/sdmc_factory.h3
2 files changed, 10 insertions, 1 deletions
diff --git a/src/core/file_sys/sdmc_factory.cpp b/src/core/file_sys/sdmc_factory.cpp
index e5668d70e..d63d960ce 100644
--- a/src/core/file_sys/sdmc_factory.cpp
+++ b/src/core/file_sys/sdmc_factory.cpp
@@ -14,7 +14,9 @@ SDMCFactory::SDMCFactory(VirtualDir dir_)
14 GetOrCreateDirectoryRelative(dir, "/Nintendo/Contents/registered"), 14 GetOrCreateDirectoryRelative(dir, "/Nintendo/Contents/registered"),
15 [](const VirtualFile& file, const NcaID& id) { 15 [](const VirtualFile& file, const NcaID& id) {
16 return NAX{file, id}.GetDecrypted(); 16 return NAX{file, id}.GetDecrypted();
17 })) {} 17 })),
18 placeholder(std::make_unique<PlaceholderCache>(
19 GetOrCreateDirectoryRelative(dir, "/Nintendo/Contents/placehld"))) {}
18 20
19SDMCFactory::~SDMCFactory() = default; 21SDMCFactory::~SDMCFactory() = default;
20 22
@@ -30,4 +32,8 @@ RegisteredCache* SDMCFactory::GetSDMCContents() const {
30 return contents.get(); 32 return contents.get();
31} 33}
32 34
35PlaceholderCache* SDMCFactory::GetSDMCPlaceholder() const {
36 return placeholder.get();
37}
38
33} // namespace FileSys 39} // namespace FileSys
diff --git a/src/core/file_sys/sdmc_factory.h b/src/core/file_sys/sdmc_factory.h
index a98e44f85..2ef5909a6 100644
--- a/src/core/file_sys/sdmc_factory.h
+++ b/src/core/file_sys/sdmc_factory.h
@@ -11,6 +11,7 @@
11namespace FileSys { 11namespace FileSys {
12 12
13class RegisteredCache; 13class RegisteredCache;
14class PlaceholderCache;
14 15
15/// File system interface to the SDCard archive 16/// File system interface to the SDCard archive
16class SDMCFactory { 17class SDMCFactory {
@@ -23,11 +24,13 @@ public:
23 VirtualDir GetSDMCContentDirectory() const; 24 VirtualDir GetSDMCContentDirectory() const;
24 25
25 RegisteredCache* GetSDMCContents() const; 26 RegisteredCache* GetSDMCContents() const;
27 PlaceholderCache* GetSDMCPlaceholder() const;
26 28
27private: 29private:
28 VirtualDir dir; 30 VirtualDir dir;
29 31
30 std::unique_ptr<RegisteredCache> contents; 32 std::unique_ptr<RegisteredCache> contents;
33 std::unique_ptr<PlaceholderCache> placeholder;
31}; 34};
32 35
33} // namespace FileSys 36} // namespace FileSys