summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Rice <glennricster@gmail.com>2011-06-19 01:22:34 +0000
committerGlenn Rice <glennricster@gmail.com>2011-06-19 01:22:34 +0000
commitbc416a552e8a80521cbb93aa674fcdc29b2cd400 (patch)
tree731c4a60fbb5641047ea5c0a691673e265ac2742
parentc2475f852e3a3b77db22e91d25fc913cd75dda32 (diff)
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
-rw-r--r--Source/Core/DolphinWX/Src/FrameTools.cpp36
1 files changed, 16 insertions, 20 deletions
diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp
index ab986f6b85..052a65a063 100644
--- a/Source/Core/DolphinWX/Src/FrameTools.cpp
+++ b/Source/Core/DolphinWX/Src/FrameTools.cpp
@@ -1021,6 +1021,7 @@ void CFrame::DoPause()
// Stop the emulation
void CFrame::DoStop()
{
+ m_bGameLoading = false;
if (Core::GetState() != Core::CORE_UNINITIALIZED ||
m_RenderParent != NULL)
{
@@ -1093,8 +1094,6 @@ void CFrame::DoStop()
m_RenderFrame->Destroy();
m_RenderParent = NULL;
- UpdateGUI();
-
// Clean framerate indications from the status bar.
GetStatusBar()->SetStatusText(wxT(" "), 0);
@@ -1113,6 +1112,7 @@ void CFrame::DoStop()
m_GameListCtrl->Enable();
m_GameListCtrl->Show();
+ UpdateGUI();
}
}
@@ -1142,7 +1142,6 @@ void CFrame::DoRecordingSave()
void CFrame::OnStop(wxCommandEvent& WXUNUSED (event))
{
- m_bGameLoading = false;
DoStop();
}
@@ -1602,7 +1601,7 @@ void CFrame::UpdateGUI()
}
}
- if (!Initialized)
+ if (!Initialized && !m_bGameLoading)
{
if (m_GameListCtrl->IsEnabled())
{
@@ -1615,7 +1614,7 @@ void CFrame::UpdateGUI()
}
// Prepare to load last selected file, enable play button
else if (!SConfig::GetInstance().m_LastFilename.empty()
- && wxFileExists(wxString(SConfig::GetInstance().m_LastFilename.c_str(), wxConvUTF8)))
+ && wxFileExists(wxString(SConfig::GetInstance().m_LastFilename.c_str(), wxConvUTF8)))
{
if (m_ToolBar)
m_ToolBar->EnableTool(IDM_PLAY, true);
@@ -1630,24 +1629,21 @@ void CFrame::UpdateGUI()
}
}
- if (m_GameListCtrl && !m_bGameLoading)
+ // Game has not started, show game list
+ if (!m_GameListCtrl->IsShown())
{
- // Game has not started, show game list
- if (!m_GameListCtrl->IsShown())
- {
- m_GameListCtrl->Enable();
- m_GameListCtrl->Show();
- }
- // Game has been selected but not started, enable play button
- if (m_GameListCtrl->GetSelectedISO() != NULL && m_GameListCtrl->IsEnabled() && !m_bGameLoading)
- {
- if (m_ToolBar)
- m_ToolBar->EnableTool(IDM_PLAY, true);
- GetMenuBar()->FindItem(IDM_PLAY)->Enable(true);
- }
+ m_GameListCtrl->Enable();
+ m_GameListCtrl->Show();
+ }
+ // Game has been selected but not started, enable play button
+ if (m_GameListCtrl->GetSelectedISO() != NULL && m_GameListCtrl->IsEnabled())
+ {
+ if (m_ToolBar)
+ m_ToolBar->EnableTool(IDM_PLAY, true);
+ GetMenuBar()->FindItem(IDM_PLAY)->Enable(true);
}
}
- else
+ else if (Initialized)
{
// Game has been loaded, enable the pause button
if (m_ToolBar)