Fix bug when Run in Background is Disabled, emulator will now remember if the emulator was paused before losing focus, if it was, it will not unpause when activated.

This commit is contained in:
adelikat 2012-07-25 00:45:05 +00:00
parent f72905f602
commit 863a7c3690
1 changed files with 14 additions and 1 deletions

View File

@ -1176,13 +1176,26 @@ namespace BizHawk.MultiClient
private void MainForm_Deactivate(object sender, EventArgs e)
{
if (!Global.Config.RunInBackground)
{
if (EmulatorPaused)
{
wasPaused = true;
}
PauseEmulator();
}
}
private void MainForm_Activated(object sender, EventArgs e)
{
if (!Global.Config.RunInBackground)
UnpauseEmulator();
{
if (!wasPaused)
{
UnpauseEmulator();
}
wasPaused = false;
}
}
private void readonlyToolStripMenuItem_Click(object sender, EventArgs e)