mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
MusicMod: Stop function
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1787 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -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
|
||||
|
@ -105,7 +105,7 @@ class CFrame : public wxFrame
|
||||
wxToolBarToolBase* mm_ToolMute, * mm_ToolPlay, * mm_ToolLog;
|
||||
|
||||
void MM_UpdateGUI(); void MM_PopulateGUI(); void MM_InitBitmaps(int Theme);
|
||||
void MM_OnPlay();
|
||||
void MM_OnPlay(); void MM_OnStop();
|
||||
void MM_OnMute(wxCommandEvent& event);
|
||||
void MM_OnPause(wxCommandEvent& event);
|
||||
void MM_OnVolume(wxScrollEvent& event);
|
||||
@ -169,7 +169,7 @@ class CFrame : public wxFrame
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnHelp(wxCommandEvent& event);
|
||||
|
||||
void OnOpen(wxCommandEvent& event); void DoOpen(bool Boot); // File
|
||||
void OnOpen(wxCommandEvent& event); void DoOpen(bool Boot); // File menu
|
||||
void OnRefresh(wxCommandEvent& event);
|
||||
void OnBrowse(wxCommandEvent& event);
|
||||
|
||||
|
@ -138,10 +138,10 @@ void CFrame::CreateMenu()
|
||||
pOptionsMenu->Append(IDM_CONFIG_DSP_PLUGIN, _T("&DSP settings"));
|
||||
pOptionsMenu->Append(IDM_CONFIG_PAD_PLUGIN, _T("&Pad settings"));
|
||||
pOptionsMenu->Append(IDM_CONFIG_WIIMOTE_PLUGIN, _T("&Wiimote settings"));
|
||||
#ifdef _WIN32
|
||||
pOptionsMenu->AppendSeparator();
|
||||
pOptionsMenu->Append(IDM_TOGGLE_FULLSCREEN, _T("&Fullscreen\tAlt+Enter"));
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
pOptionsMenu->AppendSeparator();
|
||||
pOptionsMenu->Append(IDM_TOGGLE_FULLSCREEN, _T("&Fullscreen\tAlt+Enter"));
|
||||
#endif
|
||||
m_pMenuBar->Append(pOptionsMenu, _T("&Options"));
|
||||
|
||||
// Misc menu
|
||||
@ -422,41 +422,18 @@ void CFrame::OnChangeDisc(wxCommandEvent& WXUNUSED (event))
|
||||
// =============
|
||||
|
||||
|
||||
void CFrame::OnQuit(wxCommandEvent& WXUNUSED (event))
|
||||
void CFrame::OnRefresh(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)
|
||||
if (m_GameListCtrl)
|
||||
{
|
||||
Core::Stop();
|
||||
UpdateGUI();
|
||||
m_GameListCtrl->Update();
|
||||
}
|
||||
}
|
||||
|
||||
void CFrame::OnHelp(wxCommandEvent& event)
|
||||
|
||||
void CFrame::OnBrowse(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
switch (event.GetId())
|
||||
{
|
||||
case IDM_HELPABOUT:
|
||||
{
|
||||
AboutDolphin frame(this);
|
||||
frame.ShowModal();
|
||||
break;
|
||||
}
|
||||
case IDM_HELPWEBSITE:
|
||||
File::Launch("http://www.dolphin-emu.com/");
|
||||
break;
|
||||
case IDM_HELPGOOGLECODE:
|
||||
File::Launch("http://code.google.com/p/dolphin-emu/");
|
||||
break;
|
||||
}
|
||||
m_GameListCtrl->BrowseForDirectory();
|
||||
}
|
||||
|
||||
|
||||
@ -509,8 +486,13 @@ void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
|
||||
}
|
||||
// =============
|
||||
|
||||
|
||||
void CFrame::DoStop()
|
||||
{
|
||||
#ifdef MUSICMOD // Music modification
|
||||
MM_OnStop();
|
||||
#endif
|
||||
|
||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
{
|
||||
Core::Stop();
|
||||
@ -545,15 +527,6 @@ void CFrame::OnStop(wxCommandEvent& WXUNUSED (event))
|
||||
}
|
||||
|
||||
|
||||
void CFrame::OnRefresh(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
if (m_GameListCtrl)
|
||||
{
|
||||
m_GameListCtrl->Update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CFrame::OnConfigMain(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
CConfigMain ConfigMain(this);
|
||||
@ -595,10 +568,31 @@ void CFrame::OnPluginWiimote(wxCommandEvent& WXUNUSED (event))
|
||||
);
|
||||
}
|
||||
|
||||
void CFrame::OnBrowse(wxCommandEvent& WXUNUSED (event))
|
||||
|
||||
void CFrame::OnHelp(wxCommandEvent& event)
|
||||
{
|
||||
m_GameListCtrl->BrowseForDirectory();
|
||||
switch (event.GetId())
|
||||
{
|
||||
case IDM_HELPABOUT:
|
||||
{
|
||||
AboutDolphin frame(this);
|
||||
frame.ShowModal();
|
||||
break;
|
||||
}
|
||||
case IDM_HELPWEBSITE:
|
||||
File::Launch("http://www.dolphin-emu.com/");
|
||||
break;
|
||||
case IDM_HELPGOOGLECODE:
|
||||
File::Launch("http://code.google.com/p/dolphin-emu/");
|
||||
break;
|
||||
}
|
||||
}
|
||||
// ========= // Toolbar
|
||||
|
||||
|
||||
// =======================================================
|
||||
// Miscellaneous menu
|
||||
// -------------
|
||||
|
||||
void CFrame::OnMemcard(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
@ -610,6 +604,8 @@ void CFrame::OnShow_CheatsWindow(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
CheatsWindow = new wxCheatsWindow(this, wxDefaultPosition, wxSize(600, 390));
|
||||
}
|
||||
// =============
|
||||
|
||||
|
||||
|
||||
// =======================================================
|
||||
|
Reference in New Issue
Block a user