summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-06-27 15:44:17 +0200
committerLéo Lam <leo@innovatetechnologi.es>2017-06-27 20:43:39 +0200
commitff83b93949973974a0cdab930261b6e8513f8a4d (patch)
tree76abf93f6a7270a37db6ffedd150a653006f2e27 /Source/Core
parentffe4135d772bd5f348ae892f2b18668f48f1ae01 (diff)
Remove unnecessary WiiRoot inits/shutdowns
* IOS: WiiRoot shutdown was moved to HW. * Movie: Don't call UpdateWantDeterminism() if we're not running yet, because this will automatically be done during the boot process. Not doing this will result in two NANDs being created.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/IOS/IOS.cpp4
-rw-r--r--Source/Core/Core/IOS/IOS.h1
-rw-r--r--Source/Core/Core/Movie.cpp3
3 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/Core/IOS/IOS.cpp b/Source/Core/Core/IOS/IOS.cpp
index 6e43aaeabf..06c8e4ecd1 100644
--- a/Source/Core/Core/IOS/IOS.cpp
+++ b/Source/Core/Core/IOS/IOS.cpp
@@ -180,6 +180,7 @@ Kernel::Kernel()
// using more than one IOS instance at a time is not supported.
_assert_(GetIOS() == nullptr);
Core::InitializeWiiRoot(false);
+ m_is_responsible_for_nand_root = true;
AddCoreDevices();
}
@@ -198,7 +199,8 @@ Kernel::~Kernel()
m_device_map.clear();
}
- Core::ShutdownWiiRoot();
+ if (m_is_responsible_for_nand_root)
+ Core::ShutdownWiiRoot();
}
Kernel::Kernel(u64 title_id) : m_title_id(title_id)
diff --git a/Source/Core/Core/IOS/IOS.h b/Source/Core/Core/IOS/IOS.h
index b7604b0d23..aaf6b18671 100644
--- a/Source/Core/Core/IOS/IOS.h
+++ b/Source/Core/Core/IOS/IOS.h
@@ -133,6 +133,7 @@ protected:
s32 GetFreeDeviceID();
s32 OpenDevice(OpenRequest& request);
+ bool m_is_responsible_for_nand_root = false;
u64 m_title_id = 0;
static constexpr u8 IPC_MAX_FDS = 0x18;
std::map<std::string, std::shared_ptr<Device::Device>> m_device_map;
diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp
index 7241becd47..cade8d20f0 100644
--- a/Source/Core/Core/Movie.cpp
+++ b/Source/Core/Core/Movie.cpp
@@ -625,7 +625,8 @@ bool BeginRecordingInput(int controllers)
s_currentByte = s_totalBytes = 0;
- Core::UpdateWantDeterminism();
+ if (Core::IsRunning())
+ Core::UpdateWantDeterminism();
Core::PauseAndLock(false, was_unpaused);