From dc91e8b60793276e83cc3c141dcdc551aa36d8ed Mon Sep 17 00:00:00 2001 From: comex Date: Mon, 17 Nov 2014 20:59:14 -0500 Subject: 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. --- Source/Core/Common/SysConf.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Source/Core/Common/SysConf.cpp') diff --git a/Source/Core/Common/SysConf.cpp b/Source/Core/Common/SysConf.cpp index 94124c4957..a0d3aa1f04 100644 --- a/Source/Core/Common/SysConf.cpp +++ b/Source/Core/Common/SysConf.cpp @@ -8,6 +8,7 @@ #include #include +#include "Common/CommonPaths.h" #include "Common/CommonTypes.h" #include "Common/FileUtil.h" #include "Common/SysConf.h" @@ -15,8 +16,7 @@ SysConf::SysConf() : m_IsValid(false) { - m_FilenameDefault = File::GetUserPath(F_WIISYSCONF_IDX); - m_IsValid = LoadFromFile(m_FilenameDefault); + UpdateLocation(); } SysConf::~SysConf() @@ -409,7 +409,10 @@ void SysConf::UpdateLocation() // Clear the old filename and set the default filename to the new user path // So that it can be generated if the file does not exist in the new location m_Filename.clear(); - m_FilenameDefault = File::GetUserPath(F_WIISYSCONF_IDX); + // Note: We don't use the dummy Wii root here (if in use) because this is + // all tied up with the configuration code. In the future this should + // probably just be synced with the other settings. + m_FilenameDefault = File::GetUserPath(D_WIIROOT_IDX) + DIR_SEP WII_SYSCONF_DIR DIR_SEP WII_SYSCONF; Reload(); } -- cgit v1.2.3