diff options
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/main.cpp | 3 | ||||
-rw-r--r-- | src/yuzu/multiplayer/state.cpp | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 8bd1f92f7..e103df977 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -492,8 +492,6 @@ GMainWindow::~GMainWindow() { delete render_window; } - system->GetRoomNetwork().Shutdown(); - #ifdef __linux__ ::close(sig_interrupt_fds[0]); ::close(sig_interrupt_fds[1]); @@ -3831,6 +3829,7 @@ void GMainWindow::closeEvent(QCloseEvent* event) { render_window->close(); multiplayer_state->Close(); + system->GetRoomNetwork().Shutdown(); QWidget::closeEvent(event); } diff --git a/src/yuzu/multiplayer/state.cpp b/src/yuzu/multiplayer/state.cpp index 84ea1aa4c..dba76b22b 100644 --- a/src/yuzu/multiplayer/state.cpp +++ b/src/yuzu/multiplayer/state.cpp @@ -59,7 +59,9 @@ MultiplayerState::MultiplayerState(QWidget* parent, QStandardItemModel* game_lis }); } -MultiplayerState::~MultiplayerState() { +MultiplayerState::~MultiplayerState() = default; + +void MultiplayerState::Close() { if (state_callback_handle) { if (auto member = room_network.GetRoomMember().lock()) { member->Unbind(state_callback_handle); @@ -71,9 +73,6 @@ MultiplayerState::~MultiplayerState() { member->Unbind(error_callback_handle); } } -} - -void MultiplayerState::Close() { if (host_room) { host_room->close(); } |