Initialise WiiRoot once per emulation session

This removes unnecessary initialisations which would cause issues in
determinism mode.
This commit is contained in:
Léo Lam 2017-06-27 15:44:17 +02:00
parent 94ba78d717
commit f5ef060b21
2 changed files with 5 additions and 2 deletions

View File

@ -8,6 +8,7 @@
#include "Common/CommonTypes.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreTiming.h"
#include "Core/HW/AudioInterface.h"
#include "Core/HW/CPU.h"
@ -23,6 +24,7 @@
#include "Core/HW/WII_IPC.h"
#include "Core/IOS/IOS.h"
#include "Core/State.h"
#include "Core/WiiRoot.h"
namespace HW
{
@ -48,6 +50,8 @@ void Init()
if (SConfig::GetInstance().bWii)
{
// The NAND should only be initialised once per emulation session.
Core::InitializeWiiRoot(Core::WantsDeterminism());
IOS::Init();
IOS::HLE::Init(); // Depends on Memory
}
@ -58,6 +62,7 @@ void Shutdown()
// 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();
Core::ShutdownWiiRoot();
SystemTimers::Shutdown();
CPU::Shutdown();

View File

@ -212,8 +212,6 @@ EmulationKernel::EmulationKernel(u64 title_id) : Kernel(title_id)
if (!SetupMemory(title_id, MemorySetupType::IOSReload))
WARN_LOG(IOS, "No information about this IOS -- cannot set up memory values");
Core::InitializeWiiRoot(Core::WantsDeterminism());
if (title_id == Titles::MIOS)
{
MIOS::Load();