Fixed the game list not reappearing after the close button was used.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4900 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
619fee999a
commit
292627a31e
|
@ -614,7 +614,7 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Game loading state
|
// Game loading state
|
||||||
bool game_started = false;
|
bool game_loading = false;
|
||||||
|
|
||||||
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
|
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
|
@ -650,7 +650,7 @@ void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
|
||||||
// Prepare the GUI to start the game.
|
// Prepare the GUI to start the game.
|
||||||
void CFrame::StartGame()
|
void CFrame::StartGame()
|
||||||
{
|
{
|
||||||
game_started = true;
|
game_loading = true;
|
||||||
|
|
||||||
if (m_ToolBar)
|
if (m_ToolBar)
|
||||||
m_ToolBar->EnableTool(IDM_PLAY, false);
|
m_ToolBar->EnableTool(IDM_PLAY, false);
|
||||||
|
@ -732,7 +732,7 @@ void CFrame::DoStop()
|
||||||
|
|
||||||
void CFrame::OnStop(wxCommandEvent& WXUNUSED (event))
|
void CFrame::OnStop(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
game_started = false;
|
game_loading = false;
|
||||||
DoStop();
|
DoStop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1100,7 +1100,7 @@ void CFrame::UpdateGUI()
|
||||||
GetMenuBar()->FindItem(IDM_PLAY)->Enable(false);
|
GetMenuBar()->FindItem(IDM_PLAY)->Enable(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_GameListCtrl && !game_started)
|
if (m_GameListCtrl && !game_loading)
|
||||||
{
|
{
|
||||||
// Game has not started, show game list
|
// Game has not started, show game list
|
||||||
if (!m_GameListCtrl->IsShown())
|
if (!m_GameListCtrl->IsShown())
|
||||||
|
@ -1111,7 +1111,7 @@ void CFrame::UpdateGUI()
|
||||||
sizerPanel->FitInside(m_Panel);
|
sizerPanel->FitInside(m_Panel);
|
||||||
}
|
}
|
||||||
// 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() && !game_started)
|
if (m_GameListCtrl->GetSelectedISO() != NULL && m_GameListCtrl->IsEnabled() && !game_loading)
|
||||||
{
|
{
|
||||||
if (m_ToolBar)
|
if (m_ToolBar)
|
||||||
m_ToolBar->EnableTool(IDM_PLAY, true);
|
m_ToolBar->EnableTool(IDM_PLAY, true);
|
||||||
|
@ -1125,6 +1125,9 @@ void CFrame::UpdateGUI()
|
||||||
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);
|
||||||
|
|
||||||
|
// Reset game loading flag
|
||||||
|
game_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_ToolBar) m_ToolBar->Refresh();
|
if (m_ToolBar) m_ToolBar->Refresh();
|
||||||
|
|
Loading…
Reference in New Issue