diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 30d5cd7bb3..8a7e3bf1e3 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -1049,6 +1049,7 @@ void CFrame::DoStop() DoRecordingSave(); if(Movie::IsPlayingInput() || Movie::IsRecordingInput()) Movie::EndPlayInput(false); + NetPlay::StopGame(); wxBeginBusyCursor(); BootManager::Stop(); diff --git a/Source/Core/DolphinWX/Src/NetWindow.cpp b/Source/Core/DolphinWX/Src/NetWindow.cpp index 064e852028..2a545df611 100644 --- a/Source/Core/DolphinWX/Src/NetWindow.cpp +++ b/Source/Core/DolphinWX/Src/NetWindow.cpp @@ -432,7 +432,7 @@ void NetPlayDiag::OnStart(wxCommandEvent&) void NetPlayDiag::OnStop(wxCommandEvent&) { - netplay_server->StopGame(); + NetPlay::StopGame(); } void NetPlayDiag::BootGame(const std::string& filename) @@ -661,3 +661,11 @@ void PadMapDiag::OnAdjust(wxCommandEvent& event) for (unsigned int i=0; i<4; ++i) m_mapping[i] = m_map_cbox[i]->GetSelection() - 1; } + +void NetPlay::StopGame() +{ + if (netplay_server != NULL) + netplay_server->StopGame(); + + // TODO: allow non-hosting clients to close the window +} diff --git a/Source/Core/DolphinWX/Src/NetWindow.h b/Source/Core/DolphinWX/Src/NetWindow.h index e798033eab..350cde7faf 100644 --- a/Source/Core/DolphinWX/Src/NetWindow.h +++ b/Source/Core/DolphinWX/Src/NetWindow.h @@ -133,5 +133,10 @@ private: int* const m_mapping; }; +namespace NetPlay +{ + void StopGame(); +} + #endif // _NETWINDOW_H_