mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Qt/NetPlayDialog: Request game stop when core enters stopping state
This makes it possible to gracefully force stop emulation rather than having to kill Dolphin completely when NetPlay deadlocks in the input loop. Without a graceful stop, Wii saves do not get flushed to the main NAND, and are left in limbo in the temporary NAND.
This commit is contained in:
@ -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); });
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user