SysConf: Migrate to new filesystem interface

It was discovered that some titles rely on filesystem metadata to work
properly. Currently, in master they either simply won't find their
save files (for example Bolt) or will complain about the Wii system
memory being corrupted (on first use or every time depending on
the title).

In order to even be able to keep track of file metadata, we first need
to eliminate all direct accesses to the NAND and make all kinds of
operations go through the filesystem code added in PR 6421.

This commit starts the migration process by making SysConf use
the new FS interface.
This commit is contained in:
Léo Lam
2018-03-11 12:05:12 +01:00
parent 3744a6d3f5
commit 0856d4a68a
6 changed files with 44 additions and 28 deletions

View File

@ -13,6 +13,7 @@
#include "Common/StringUtil.h"
#include "Common/SysConf.h"
#include "Core/ConfigManager.h"
#include "Core/IOS/IOS.h"
#include "Core/Movie.h"
#include "Core/NetPlayClient.h"
@ -64,7 +65,7 @@ void InitializeWiiRoot(bool use_temporary)
WARN_LOG(IOS_FS, "Using temporary directory %s for minimal Wii FS", s_temp_wii_root.c_str());
File::SetUserPath(D_SESSION_WIIROOT_IDX, s_temp_wii_root);
// Generate a SYSCONF with default settings for the temporary Wii NAND.
SysConf sysconf{Common::FromWhichRoot::FROM_SESSION_ROOT};
SysConf sysconf{IOS::HLE::Kernel{}.GetFS()};
sysconf.Save();
InitializeDeterministicWiiSaves();