Also don't shut down the video plugin until after HW::Shutdown.
Not sure if this is necessary, but it matches the previous behavior. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7190 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
2ce4b29ae2
commit
2183588030
|
@ -268,14 +268,16 @@ void Stop() // - Hammertime!
|
||||||
// Stop the CPU
|
// Stop the CPU
|
||||||
INFO_LOG(CONSOLE, "%s", StopMessage(true, "Stop CPU").c_str());
|
INFO_LOG(CONSOLE, "%s", StopMessage(true, "Stop CPU").c_str());
|
||||||
PowerPC::Stop();
|
PowerPC::Stop();
|
||||||
CCPU::StepOpcode(); // Kick it if it's waiting (code stepping wait loop)
|
// Kick it if it's waiting (code stepping wait loop)
|
||||||
|
CCPU::StepOpcode();
|
||||||
|
|
||||||
if (_CoreParameter.bCPUThread)
|
if (_CoreParameter.bCPUThread)
|
||||||
{
|
{
|
||||||
// Video_EnterLoop() should now exit so that EmuThread() will continue
|
// Video_EnterLoop() should now exit so that EmuThread()
|
||||||
// concurrently with the rest of the commands in this function. We no
|
// will continue concurrently with the rest of the commands
|
||||||
// longer rely on Postmessage.
|
// in this function. We no longer rely on Postmessage.
|
||||||
INFO_LOG(CONSOLE, "%s", StopMessage(true, "Wait for Video Loop to exit ...").c_str());
|
INFO_LOG(CONSOLE, "%s", StopMessage(true,
|
||||||
|
"Wait for Video Loop to exit ...").c_str());
|
||||||
g_video_backend->Video_ExitLoop();
|
g_video_backend->Video_ExitLoop();
|
||||||
|
|
||||||
// Wait until the CPU finishes exiting the main run loop
|
// Wait until the CPU finishes exiting the main run loop
|
||||||
|
@ -291,13 +293,15 @@ void Stop() // - Hammertime!
|
||||||
// Update mouse pointer
|
// Update mouse pointer
|
||||||
Host_SetWaitCursor(false);
|
Host_SetWaitCursor(false);
|
||||||
|
|
||||||
INFO_LOG(CONSOLE, "%s", StopMessage(true, "Stopping Emu thread ...").c_str());
|
INFO_LOG(CONSOLE, "%s",
|
||||||
|
StopMessage(true, "Stopping Emu thread ...").c_str());
|
||||||
g_EmuThread.join(); // Wait for emuthread to close.
|
g_EmuThread.join(); // Wait for emuthread to close.
|
||||||
|
|
||||||
INFO_LOG(CONSOLE, "%s", StopMessage(true, "Main thread stopped").c_str());
|
INFO_LOG(CONSOLE, "%s",
|
||||||
|
StopMessage(true, "Main thread stopped").c_str());
|
||||||
|
|
||||||
// Stop audio thread - Actually this does nothing when using HLE emulation.
|
// Stop audio thread - Actually this does nothing when using HLE
|
||||||
// But stops the DSP Interpreter when using LLE emulation.
|
// emulation, but stops the DSP Interpreter when using LLE emulation.
|
||||||
DSP::GetDSPEmulator()->DSP_StopSoundStream();
|
DSP::GetDSPEmulator()->DSP_StopSoundStream();
|
||||||
|
|
||||||
// We must set up this flag before executing HW::Shutdown()
|
// We must set up this flag before executing HW::Shutdown()
|
||||||
|
@ -308,6 +312,10 @@ void Stop() // - Hammertime!
|
||||||
Pad::Shutdown();
|
Pad::Shutdown();
|
||||||
Wiimote::Shutdown();
|
Wiimote::Shutdown();
|
||||||
|
|
||||||
|
// In single core mode, this has already been called.
|
||||||
|
if (_CoreParameter.bCPUThread)
|
||||||
|
g_video_backend->Shutdown();
|
||||||
|
|
||||||
INFO_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutdown complete ----");
|
INFO_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutdown complete ----");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,10 +459,6 @@ void EmuThread()
|
||||||
VolumeHandler::EjectVolume();
|
VolumeHandler::EjectVolume();
|
||||||
FileMon::Close();
|
FileMon::Close();
|
||||||
|
|
||||||
// In single core mode, this has already been called.
|
|
||||||
if (_CoreParameter.bCPUThread)
|
|
||||||
g_video_backend->Shutdown();
|
|
||||||
|
|
||||||
cpuRunloopQuit.Shutdown();
|
cpuRunloopQuit.Shutdown();
|
||||||
g_bStopping = false;
|
g_bStopping = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue