fix bug where autodump (and maybe lua-instructed client exits) would vanish the window but linger the process

This commit is contained in:
zeromus 2018-04-08 01:48:47 -05:00
parent cdc1f0c21f
commit a7197b348e
2 changed files with 6 additions and 6 deletions

View File

@ -695,12 +695,12 @@ namespace BizHawk.Client.EmuHawk
public void CloseEmulator()
{
_exit = true;
_exitRequestPending = true;
}
public void CloseEmulator(int exitCode)
{
_exit = true;
_exitRequestPending = true;
_exitCode = exitCode;
}
@ -2947,7 +2947,7 @@ namespace BizHawk.Client.EmuHawk
protected override void OnClosed(EventArgs e)
{
_exit = true;
_windowClosedAndSafeToExitProcess = true;
base.OnClosed(e);
}

View File

@ -493,7 +493,7 @@ namespace BizHawk.Client.EmuHawk
Close();
}
if (_exit)
if (_windowClosedAndSafeToExitProcess)
{
break;
}
@ -1370,7 +1370,7 @@ namespace BizHawk.Client.EmuHawk
private int _avwriterResizeh;
private bool _avwriterpad;
private bool _exit;
private bool _windowClosedAndSafeToExitProcess;
private int _exitCode;
private bool _exitRequestPending;
private bool _runloopFrameProgress;
@ -3427,7 +3427,7 @@ namespace BizHawk.Client.EmuHawk
StopAv();
if (argParse._autoCloseOnDump)
{
_exit = true;
_exitRequestPending = true;
}
}
}