mirror of
https://github.com/SourMesen/Mesen.git
synced 2025-04-02 10:52:48 -04:00
Fixed deadlock when closing emu while paused
This commit is contained in:
parent
494f02c306
commit
0299503d71
1 changed files with 2 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue