diff --git a/pcsx2/System/SysCoreThread.cpp b/pcsx2/System/SysCoreThread.cpp index 3779002dc8..d3d7660b4e 100644 --- a/pcsx2/System/SysCoreThread.cpp +++ b/pcsx2/System/SysCoreThread.cpp @@ -29,6 +29,7 @@ #include "FW.h" #include "SPU2/spu2.h" #include "DEV9/DEV9.h" +#include "USB/USB.h" #include "../DebugTools/MIPSAnalyst.h" #include "../DebugTools/SymbolMap.h" @@ -96,6 +97,7 @@ void SysCoreThread::Start() GetCorePlugins().Init(); SPU2init(); DEV9init(); + USBinit(); _parent::Start(); } @@ -304,6 +306,7 @@ void SysCoreThread::OnSuspendInThread() { GetCorePlugins().Close(); DEV9close(); + USBclose(); DoCDVDclose(); FWclose(); SPU2close(); @@ -317,6 +320,7 @@ void SysCoreThread::OnResumeInThread(bool isSuspended) FWopen(); SPU2open((void*)pDsp); DEV9open((void*)pDsp); + USBopen((void*)pDsp); } @@ -331,12 +335,14 @@ void SysCoreThread::OnCleanupInThread() R3000A::ioman::reset(); // FIXME: temporary workaround for deadlock on exit, which actually should be a crash vu1Thread.WaitVU(); + USBclose(); SPU2close(); DEV9close(); DoCDVDclose(); FWclose(); GetCorePlugins().Close(); GetCorePlugins().Shutdown(); + USBshutdown(); SPU2shutdown(); DEV9shutdown(); diff --git a/pcsx2/gui/AppCoreThread.cpp b/pcsx2/gui/AppCoreThread.cpp index 326753bd88..d889b9b735 100644 --- a/pcsx2/gui/AppCoreThread.cpp +++ b/pcsx2/gui/AppCoreThread.cpp @@ -29,6 +29,7 @@ #include "CDVD/CDVD.h" #include "SPU2/spu2.h" +#include "USB/USB.h" #include "Elfheader.h" #include "Patch.h" #include "R5900Exceptions.h" @@ -171,6 +172,7 @@ void AppCoreThread::Resume() GetCorePlugins().Init(); SPU2init(); + USBinit(); _parent::Resume(); }