mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-10-30 15:39:02 -05:00 
			
		
		
		
	sdmc_factory: Add accessor for SDMC PlaceholderCache
This commit is contained in:
		| @@ -14,7 +14,9 @@ SDMCFactory::SDMCFactory(VirtualDir dir_) | ||||
|                                 GetOrCreateDirectoryRelative(dir, "/Nintendo/Contents/registered"), | ||||
|                                 [](const VirtualFile& file, const NcaID& id) { | ||||
|                                     return NAX{file, id}.GetDecrypted(); | ||||
|                                 })) {} | ||||
|                                 })), | ||||
|       placeholder(std::make_unique<PlaceholderCache>( | ||||
|           GetOrCreateDirectoryRelative(dir, "/Nintendo/Contents/placehld"))) {} | ||||
|  | ||||
| SDMCFactory::~SDMCFactory() = default; | ||||
|  | ||||
| @@ -30,4 +32,8 @@ RegisteredCache* SDMCFactory::GetSDMCContents() const { | ||||
|     return contents.get(); | ||||
| } | ||||
|  | ||||
| PlaceholderCache* SDMCFactory::GetSDMCPlaceholder() const { | ||||
|     return placeholder.get(); | ||||
| } | ||||
|  | ||||
| } // namespace FileSys | ||||
|   | ||||
| @@ -11,6 +11,7 @@ | ||||
| namespace FileSys { | ||||
|  | ||||
| class RegisteredCache; | ||||
| class PlaceholderCache; | ||||
|  | ||||
| /// File system interface to the SDCard archive | ||||
| class SDMCFactory { | ||||
| @@ -23,11 +24,13 @@ public: | ||||
|     VirtualDir GetSDMCContentDirectory() const; | ||||
|  | ||||
|     RegisteredCache* GetSDMCContents() const; | ||||
|     PlaceholderCache* GetSDMCPlaceholder() const; | ||||
|  | ||||
| private: | ||||
|     VirtualDir dir; | ||||
|  | ||||
|     std::unique_ptr<RegisteredCache> contents; | ||||
|     std::unique_ptr<PlaceholderCache> placeholder; | ||||
| }; | ||||
|  | ||||
| } // namespace FileSys | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zach Hilman
					Zach Hilman