Interface settings: Added confirm on stop option

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1635 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2008-12-23 11:11:02 +00:00
parent 8cc09ef74d
commit ed156f3eeb
4 changed files with 95 additions and 27 deletions

View File

@ -342,7 +342,7 @@ void CFrame::InitBitmaps()
// =======================================================
// Open file
// Open file to boot or for changing disc
// -------------
void CFrame::OnOpen(wxCommandEvent& WXUNUSED (event))
{
@ -505,8 +505,23 @@ void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
void CFrame::OnStop(wxCommandEvent& WXUNUSED (event))
{
Core::Stop();
UpdateGUI();
// Ask for confirmation in case the user accidently clicked Stop
int answer;
if(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
{
answer = wxMessageBox("Are you sure you want to stop the current emulation?",
"Confirm", wxYES_NO);
}
else
{
answer = wxYES;
}
if (answer == wxYES && Core::GetState() != Core::CORE_UNINITIALIZED)
{
Core::Stop();
UpdateGUI();
}
}