mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 09:39:13 +00:00
Get rid of a singleton for NAND shared contents
This also allows shared contents to be installed to the configured root when installing a WAD.
This commit is contained in:
parent
8f81051df3
commit
850802ea88
3 changed files with 15 additions and 34 deletions
|
@ -155,26 +155,15 @@ private:
|
|||
std::unordered_map<std::string, std::unique_ptr<CNANDContentLoader>> m_map;
|
||||
};
|
||||
|
||||
class CSharedContent
|
||||
class CSharedContent final
|
||||
{
|
||||
public:
|
||||
static CSharedContent& AccessInstance()
|
||||
{
|
||||
static CSharedContent instance;
|
||||
return instance;
|
||||
}
|
||||
explicit CSharedContent(Common::FromWhichRoot root);
|
||||
|
||||
std::string GetFilenameFromSHA1(const u8* hash);
|
||||
std::string GetFilenameFromSHA1(const u8* hash) const;
|
||||
std::string AddSharedContent(const u8* hash);
|
||||
void UpdateLocation();
|
||||
|
||||
private:
|
||||
CSharedContent();
|
||||
virtual ~CSharedContent();
|
||||
|
||||
CSharedContent(CSharedContent const&) = delete;
|
||||
void operator=(CSharedContent const&) = delete;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct SElement
|
||||
{
|
||||
|
@ -183,6 +172,7 @@ private:
|
|||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
Common::FromWhichRoot m_root;
|
||||
u32 m_LastID;
|
||||
std::string m_ContentMap;
|
||||
std::vector<SElement> m_Elements;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue