MusicMod: Stop function

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1787 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-01-05 04:08:18 +00:00
parent 906c8a5a63
commit b5ee01ea60
8 changed files with 129 additions and 87 deletions

View File

@ -246,9 +246,11 @@ EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage)
EVT_TIMER(wxID_ANY, CFrame::OnTimer)
#endif
END_EVENT_TABLE()
/////////////////////////////////////////////////
// ----------------------------------------------------------------------------
// implementation
// Creation and close, quit functions
// ----------------------------------------------------------------------------
CFrame::CFrame(wxFrame* parent,
@ -350,6 +352,24 @@ CFrame::~CFrame()
#endif
}
void CFrame::OnQuit(wxCommandEvent& WXUNUSED (event))
{
Close(true);
}
void CFrame::OnClose(wxCloseEvent& event)
{
// Don't forget the skip of the window won't be destroyed
event.Skip();
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
Core::Stop();
UpdateGUI();
}
}
/////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
// Input and host messages