Only update the game list when there may be changes to it.

When just starting and stopping emulation, just hide/show it,
but only if necessary because we are rendering to the main window.

Fixes issue 3460.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6889 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2011-01-20 21:37:00 +00:00
parent 12249296a1
commit 4684417409
2 changed files with 20 additions and 20 deletions

View File

@ -769,15 +769,12 @@ void CFrame::StartGame(const std::string& filename)
m_ToolBar->EnableTool(IDM_PLAY, false);
GetMenuBar()->FindItem(IDM_PLAY)->Enable(false);
// Game has been started, hide the game list
if (m_GameListCtrl->IsShown())
{
m_GameListCtrl->Disable();
m_GameListCtrl->Hide();
}
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
{
// Game has been started, hide the game list
m_GameListCtrl->Disable();
m_GameListCtrl->Hide();
m_RenderParent = m_Panel;
m_RenderFrame = this;
}
@ -986,6 +983,13 @@ void CFrame::DoStop()
// Clear wiimote connection status from the status bar.
GetStatusBar()->SetStatusText(wxT(" "), 1);
// If batch mode was specified on the command-line, exit now.
if (m_bBatchMode)
Close(true);
m_GameListCtrl->Enable();
m_GameListCtrl->Show();
}
}
@ -1017,12 +1021,6 @@ void CFrame::OnStop(wxCommandEvent& WXUNUSED (event))
{
m_bGameLoading = false;
DoStop();
// If batch mode was specified on the command-line, exit now.
if (m_bBatchMode)
Close(true);
else
UpdateGameList();
}
void CFrame::OnReset(wxCommandEvent& WXUNUSED (event))