stop emu on dead child

This commit is contained in:
Aaron Robinson 2004-09-14 07:57:21 +00:00
parent 7538c4268a
commit 2ebe736ab9
2 changed files with 7 additions and 0 deletions

BIN
Cxbx.opt

Binary file not shown.

View File

@ -1902,6 +1902,13 @@ void WndMain::StartEmulation(EnumAutoConvert x_AutoConvert, HWND hwndParent)
// stop emulation
void WndMain::StopEmulation()
{
if(!IsWindow(m_hwndChild))
{
m_hwndChild = NULL;
SetWindowText(m_hwnd, "Cxbx " _CXBX_VERSION);
RefreshMenus();
}
SendMessage(m_hwndChild, WM_CLOSE, 0, 0);
m_bCanStart = true;
}