diff options
| author | comex <comexk@gmail.com> | 2014-11-17 20:59:14 -0500 |
|---|---|---|
| committer | comex <comexk@gmail.com> | 2015-05-28 19:14:42 -0400 |
| commit | dc91e8b60793276e83cc3c141dcdc551aa36d8ed (patch) | |
| tree | 9dedab7118f77e481459b4d48278cb618a70e892 /Source/Core/DiscIO/NANDContentLoader.cpp | |
| parent | f6c6822f71e795563e5eacdb28c2a740ca79b520 (diff) | |
Add a mode to use a dummy Wii NAND.
Eventually, netplay will be able to use the host's NAND, but this could
still be useful in some cases; for TAS it definitely makes sense to have
a way to avoid using any preexisting NAND.
In terms of implementation: remove D_WIIUSER_IDX, which was just WIIROOT
+ "/", as well as some other indices which are pointless to have as
separate variables rather than just using the actual path (fixed, since
they're actual Wii NAND paths) at the call site. Then split off
D_SESSION_WIIROOT_IDX, which can point to the dummy NAND directory, from
D_WIIROOT_IDX, which always points to the "real" one the user
configured.
Diffstat (limited to 'Source/Core/DiscIO/NANDContentLoader.cpp')
| -rw-r--r-- | Source/Core/DiscIO/NANDContentLoader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/NANDContentLoader.cpp b/Source/Core/DiscIO/NANDContentLoader.cpp index 715ac6e878..c247713ee3 100644 --- a/Source/Core/DiscIO/NANDContentLoader.cpp +++ b/Source/Core/DiscIO/NANDContentLoader.cpp @@ -35,7 +35,7 @@ void CSharedContent::UpdateLocation() { m_Elements.clear(); m_lastID = 0; - m_contentMap = StringFromFormat("%sshared1/content.map", File::GetUserPath(D_WIIUSER_IDX).c_str()); + m_contentMap = StringFromFormat("%s/shared1/content.map", File::GetUserPath(D_WIIROOT_IDX).c_str()); File::IOFile pFile(m_contentMap, "rb"); SElement Element; @@ -55,7 +55,7 @@ std::string CSharedContent::GetFilenameFromSHA1(const u8* _pHash) { if (memcmp(_pHash, Element.SHA1Hash, 20) == 0) { - return StringFromFormat("%sshared1/%c%c%c%c%c%c%c%c.app", File::GetUserPath(D_WIIUSER_IDX).c_str(), + return StringFromFormat("%s/shared1/%c%c%c%c%c%c%c%c.app", File::GetUserPath(D_WIIROOT_IDX).c_str(), Element.FileName[0], Element.FileName[1], Element.FileName[2], Element.FileName[3], Element.FileName[4], Element.FileName[5], Element.FileName[6], Element.FileName[7]); } @@ -80,7 +80,7 @@ std::string CSharedContent::AddSharedContent(const u8* _pHash) File::IOFile pFile(m_contentMap, "ab"); pFile.WriteArray(&Element, 1); - filename = StringFromFormat("%sshared1/%s.app", File::GetUserPath(D_WIIUSER_IDX).c_str(), id.c_str()); + filename = StringFromFormat("%s/shared1/%s.app", File::GetUserPath(D_WIIROOT_IDX).c_str(), id.c_str()); m_lastID++; } @@ -371,7 +371,7 @@ void cUIDsys::UpdateLocation() { m_Elements.clear(); m_lastUID = 0x00001000; - m_uidSys = StringFromFormat("%ssys/uid.sys", File::GetUserPath(D_WIIUSER_IDX).c_str()); + m_uidSys = File::GetUserPath(D_SESSION_WIIROOT_IDX) + "/sys/uid.sys"; File::IOFile pFile(m_uidSys, "rb"); SElement Element; |
