Merge pull request #5710 from leoetlino/more-wiiroot-fixes

Remove unnecessary WiiRoot inits/shutdowns
This commit is contained in:
shuffle2 2017-06-27 12:05:38 -07:00 committed by GitHub
commit 0ea17dafd9
3 changed files with 6 additions and 2 deletions

View File

@ -180,6 +180,7 @@ Kernel::Kernel()
// using more than one IOS instance at a time is not supported. // using more than one IOS instance at a time is not supported.
_assert_(GetIOS() == nullptr); _assert_(GetIOS() == nullptr);
Core::InitializeWiiRoot(false); Core::InitializeWiiRoot(false);
m_is_responsible_for_nand_root = true;
AddCoreDevices(); AddCoreDevices();
} }
@ -198,6 +199,7 @@ Kernel::~Kernel()
m_device_map.clear(); m_device_map.clear();
} }
if (m_is_responsible_for_nand_root)
Core::ShutdownWiiRoot(); Core::ShutdownWiiRoot();
} }

View File

@ -133,6 +133,7 @@ protected:
s32 GetFreeDeviceID(); s32 GetFreeDeviceID();
s32 OpenDevice(OpenRequest& request); s32 OpenDevice(OpenRequest& request);
bool m_is_responsible_for_nand_root = false;
u64 m_title_id = 0; u64 m_title_id = 0;
static constexpr u8 IPC_MAX_FDS = 0x18; static constexpr u8 IPC_MAX_FDS = 0x18;
std::map<std::string, std::shared_ptr<Device::Device>> m_device_map; std::map<std::string, std::shared_ptr<Device::Device>> m_device_map;

View File

@ -625,6 +625,7 @@ bool BeginRecordingInput(int controllers)
s_currentByte = s_totalBytes = 0; s_currentByte = s_totalBytes = 0;
if (Core::IsRunning())
Core::UpdateWantDeterminism(); Core::UpdateWantDeterminism();
Core::PauseAndLock(false, was_unpaused); Core::PauseAndLock(false, was_unpaused);