Check whether the core is running instead of checking if it is unitialized.

This properly handles the stopping state and more accurately represents the intended check.
This commit is contained in:
Jules Blok
2014-07-08 00:47:57 +02:00
parent ad1b61af2e
commit db7e746cb4
10 changed files with 21 additions and 24 deletions

View File

@ -802,7 +802,7 @@ void CFrame::OnRecordExport(wxCommandEvent& WXUNUSED (event))
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
{
if (Core::GetState() != Core::CORE_UNINITIALIZED)
if (Core::IsRunning())
{
// Core is initialized and emulator is running
if (UseDebugger)
@ -1581,7 +1581,7 @@ void CFrame::OnLoadLastState(wxCommandEvent& event)
void CFrame::OnSaveFirstState(wxCommandEvent& WXUNUSED(event))
{
if (Core::GetState() != Core::CORE_UNINITIALIZED)
if (Core::IsRunningAndStarted())
State::SaveFirstSaved();
}