diff options
| author | 2019-04-10 12:32:19 -0400 | |
|---|---|---|
| committer | 2019-09-21 16:43:10 -0400 | |
| commit | 0084cceb203544e306d7089bc81d81e20e1ddafa (patch) | |
| tree | bd05307331b5d56a146af9c5097cdfff9ffeca8c /src | |
| parent | sdmc_factory: Add accessor for content directory (diff) | |
| download | yuzu-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.cpp | 8 | ||||
| -rw-r--r-- | src/core/file_sys/sdmc_factory.h | 3 |
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 | ||
| 19 | SDMCFactory::~SDMCFactory() = default; | 21 | SDMCFactory::~SDMCFactory() = default; |
| 20 | 22 | ||
| @@ -30,4 +32,8 @@ RegisteredCache* SDMCFactory::GetSDMCContents() const { | |||
| 30 | return contents.get(); | 32 | return contents.get(); |
| 31 | } | 33 | } |
| 32 | 34 | ||
| 35 | PlaceholderCache* 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 @@ | |||
| 11 | namespace FileSys { | 11 | namespace FileSys { |
| 12 | 12 | ||
| 13 | class RegisteredCache; | 13 | class RegisteredCache; |
| 14 | class PlaceholderCache; | ||
| 14 | 15 | ||
| 15 | /// File system interface to the SDCard archive | 16 | /// File system interface to the SDCard archive |
| 16 | class SDMCFactory { | 17 | class 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 | ||
| 27 | private: | 29 | private: |
| 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 |