Skip to content

Commit

Permalink
Merge pull request #5708 from leoetlino/once
Browse files Browse the repository at this point in the history
Initialise WiiRoot once per emulation session
  • Loading branch information
shuffle2 committed Jun 27, 2017
2 parents 2579a7c + f5ef060 commit ffe4135
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Source/Core/Core/HW/HW.cpp
Expand Up @@ -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"
Expand All @@ -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
{
Expand All @@ -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
}
Expand All @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/Core/IOS/IOS.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit ffe4135

Please sign in to comment.