Make sure the play button is disabled while a game is starting when not rendering to main. This should fully resolve issue 4602.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7608 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2011-06-19 01:22:34 +00:00
parent c2475f852e
commit bc416a552e
1 changed files with 16 additions and 20 deletions

View File

@ -1021,6 +1021,7 @@ void CFrame::DoPause()
// Stop the emulation // Stop the emulation
void CFrame::DoStop() void CFrame::DoStop()
{ {
m_bGameLoading = false;
if (Core::GetState() != Core::CORE_UNINITIALIZED || if (Core::GetState() != Core::CORE_UNINITIALIZED ||
m_RenderParent != NULL) m_RenderParent != NULL)
{ {
@ -1093,8 +1094,6 @@ void CFrame::DoStop()
m_RenderFrame->Destroy(); m_RenderFrame->Destroy();
m_RenderParent = NULL; m_RenderParent = NULL;
UpdateGUI();
// Clean framerate indications from the status bar. // Clean framerate indications from the status bar.
GetStatusBar()->SetStatusText(wxT(" "), 0); GetStatusBar()->SetStatusText(wxT(" "), 0);
@ -1113,6 +1112,7 @@ void CFrame::DoStop()
m_GameListCtrl->Enable(); m_GameListCtrl->Enable();
m_GameListCtrl->Show(); m_GameListCtrl->Show();
UpdateGUI();
} }
} }
@ -1142,7 +1142,6 @@ void CFrame::DoRecordingSave()
void CFrame::OnStop(wxCommandEvent& WXUNUSED (event)) void CFrame::OnStop(wxCommandEvent& WXUNUSED (event))
{ {
m_bGameLoading = false;
DoStop(); DoStop();
} }
@ -1602,7 +1601,7 @@ void CFrame::UpdateGUI()
} }
} }
if (!Initialized) if (!Initialized && !m_bGameLoading)
{ {
if (m_GameListCtrl->IsEnabled()) if (m_GameListCtrl->IsEnabled())
{ {
@ -1630,8 +1629,6 @@ void CFrame::UpdateGUI()
} }
} }
if (m_GameListCtrl && !m_bGameLoading)
{
// Game has not started, show game list // Game has not started, show game list
if (!m_GameListCtrl->IsShown()) if (!m_GameListCtrl->IsShown())
{ {
@ -1639,15 +1636,14 @@ void CFrame::UpdateGUI()
m_GameListCtrl->Show(); m_GameListCtrl->Show();
} }
// Game has been selected but not started, enable play button // Game has been selected but not started, enable play button
if (m_GameListCtrl->GetSelectedISO() != NULL && m_GameListCtrl->IsEnabled() && !m_bGameLoading) if (m_GameListCtrl->GetSelectedISO() != NULL && m_GameListCtrl->IsEnabled())
{ {
if (m_ToolBar) if (m_ToolBar)
m_ToolBar->EnableTool(IDM_PLAY, true); m_ToolBar->EnableTool(IDM_PLAY, true);
GetMenuBar()->FindItem(IDM_PLAY)->Enable(true); GetMenuBar()->FindItem(IDM_PLAY)->Enable(true);
} }
} }
} else if (Initialized)
else
{ {
// Game has been loaded, enable the pause button // Game has been loaded, enable the pause button
if (m_ToolBar) if (m_ToolBar)