Merge pull request #6024 from ligfx/coreonstatechangedcallback

Qt: use Settings::EmulationStateChanged
This commit is contained in:
Leo Lam
2017-09-15 18:45:17 +02:00
committed by GitHub
31 changed files with 156 additions and 199 deletions
+3 -2
View File
@@ -530,8 +530,9 @@ void CFrame::InitializeCoreCallbacks()
});
// Warning: this gets called from the EmuThread
Core::SetOnStoppedCallback([this] {
AddPendingEvent(wxCommandEvent{wxEVT_HOST_COMMAND, IDM_STOPPED});
Core::SetOnStateChangedCallback([this](Core::State state) {
if (state == Core::State::Uninitialized)
AddPendingEvent(wxCommandEvent{wxEVT_HOST_COMMAND, IDM_STOPPED});
});
}
+1 -1
View File
@@ -446,7 +446,7 @@ void CFrame::OnFrameStep(wxCommandEvent& event)
{
bool wasPaused = Core::GetState() == Core::State::Paused;
Movie::DoFrameStep();
Core::DoFrameStep();
bool isPaused = Core::GetState() == Core::State::Paused;
if (isPaused && !wasPaused) // don't update on unpause, otherwise the status would be wrong when