Merge pull request #6024 from ligfx/coreonstatechangedcallback
Qt: use Settings::EmulationStateChanged
This commit is contained in:
@@ -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});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user