From 3cbed527c2ee7f20dc78a7467d970530d4e302d1 Mon Sep 17 00:00:00 2001 From: Michael Ehrenreich Date: Thu, 12 Nov 2015 22:11:59 +0100 Subject: [PATCH] Shut down HW in reverse initialization order Fixes a race condition between Memory and CWII_IPC_HLE_Device_hid --- Source/Core/Core/HW/HW.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/HW/HW.cpp b/Source/Core/Core/HW/HW.cpp index b9ae3c6068..c15cdeb7e2 100644 --- a/Source/Core/Core/HW/HW.cpp +++ b/Source/Core/Core/HW/HW.cpp @@ -56,28 +56,28 @@ namespace HW DiscIO::cUIDsys::AccessInstance().UpdateLocation(); DiscIO::CSharedContent::AccessInstance().UpdateLocation(); WII_IPCInterface::Init(); - WII_IPC_HLE_Interface::Init(); + WII_IPC_HLE_Interface::Init(); // Depends on Memory } } void Shutdown() { + if (SConfig::GetInstance().bWii) + { + WII_IPC_HLE_Interface::Shutdown(); // Depends on Memory + WII_IPCInterface::Shutdown(); + Common::ShutdownWiiRoot(); + } + SystemTimers::Shutdown(); CPU::Shutdown(); - ExpansionInterface::Shutdown(); DVDInterface::Shutdown(); DSP::Shutdown(); Memory::Shutdown(); + ExpansionInterface::Shutdown(); SerialInterface::Shutdown(); AudioInterface::Shutdown(); - if (SConfig::GetInstance().bWii) - { - WII_IPCInterface::Shutdown(); - WII_IPC_HLE_Interface::Shutdown(); - Common::ShutdownWiiRoot(); - } - State::Shutdown(); CoreTiming::Shutdown(); }