Fixed deadlock when closing emu while paused

This commit is contained in:
Souryo 2014-07-10 23:23:04 -04:00
parent 494f02c306
commit 0299503d71

View file

@ -136,6 +136,7 @@ void Console::ResetComponents(bool softReset)
void Console::Stop()
{
_stop = true;
Console::ClearFlags(EmulationFlags::Paused);
}
void Console::Pause()
@ -245,7 +246,7 @@ void Console::Run()
Console::RunningLock.Acquire();
}
if(CheckFlag(EmulationFlags::Paused)) {
if(CheckFlag(EmulationFlags::Paused) && !_stop) {
Console::SendNotification(ConsoleNotificationType::GamePaused);
Console::RunningLock.Release();
while(CheckFlag(EmulationFlags::Paused)) {