diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index b97d62a5d9..08a990542f 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -245,6 +245,10 @@ void Stop() // - Hammertime! s_is_stopping = true; + // Notify state changed callback + if (s_on_state_changed_callback) + s_on_state_changed_callback(State::Stopping); + // Dump left over jobs HostDispatchJobs(); diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp index fb79123d88..04efe5bea9 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp @@ -338,6 +338,11 @@ void NetPlayDialog::ConnectWidgets() if (isVisible()) { GameStatusChanged(state != Core::State::Uninitialized); + if ((state == Core::State::Uninitialized || state == Core::State::Stopping) && + !m_got_stop_request) + { + Settings::Instance().GetNetPlayClient()->RequestStopGame(); + } if (state == Core::State::Uninitialized) DisplayMessage(tr("Stopped game"), "red"); } @@ -808,9 +813,6 @@ void NetPlayDialog::OnMsgChangeGame(const std::string& title) void NetPlayDialog::GameStatusChanged(bool running) { - if (!running && !m_got_stop_request) - Settings::Instance().GetNetPlayClient()->RequestStopGame(); - QueueOnObject(this, [this, running] { SetOptionsEnabled(!running); }); }