Always use configured root when installing WAD

This prevents Dolphin from writing to /sys/uid.sys (on the host; root
partition) when installing a WAD before starting emulation, because
the session root is not initialized at that moment.

Incidentally, this also gets rid of a singleton.
This commit is contained in:
Léo Lam
2017-02-08 21:37:12 +01:00
parent 96e83b5d54
commit 7a1f676ef4
4 changed files with 10 additions and 28 deletions

View File

@ -188,27 +188,16 @@ private:
std::vector<SElement> m_Elements;
};
class cUIDsys
class cUIDsys final
{
public:
static cUIDsys& AccessInstance()
{
static cUIDsys instance;
return instance;
}
explicit cUIDsys(Common::FromWhichRoot root);
u32 GetUIDFromTitle(u64 title_id);
void AddTitle(u64 title_id);
void GetTitleIDs(std::vector<u64>& title_ids, bool owned = false);
void UpdateLocation();
private:
cUIDsys();
virtual ~cUIDsys();
cUIDsys(cUIDsys const&) = delete;
void operator=(cUIDsys const&) = delete;
#pragma pack(push, 1)
struct SElement
{