WiiRoot: Move content manipulation to separate functions

{Initialize,Shutdown}WiiRoot should only be responsible for setting the
SESSION_WII_ROOT or managing the temporary NAND directory.

Move all the content manipulation out of these functions to ensure
separation of concerns and call them after/before WiiRoot init/shutdown
to make sure they operate on the correct root.
This commit is contained in:
Léo Lam
2018-05-12 16:52:33 +02:00
parent f0c5b76186
commit 5f567b38fe
3 changed files with 46 additions and 25 deletions

View File

@ -54,11 +54,13 @@ void Init()
Core::InitializeWiiRoot(Core::WantsDeterminism());
IOS::Init();
IOS::HLE::Init(); // Depends on Memory
Core::InitializeWiiFileSystemContents();
}
}
void Shutdown()
{
Core::CleanUpWiiFileSystemContents();
// IOS should always be shut down regardless of bWii because it can be running in GC mode (MIOS).
IOS::HLE::Shutdown(); // Depends on Memory
IOS::Shutdown();