summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFearlessTobi <thm.frey@gmail.com>2022-08-03 19:45:13 +0200
committerFearlessTobi <thm.frey@gmail.com>2022-08-15 20:25:42 +0200
commit72ff5cd4452b51648d91f952c5820cc9b6dfab68 (patch)
tree8f111c6ec9513d22db27d7b397afad5c7753c1b7 /src
parentinternal_network: Fix mingw compilation (diff)
downloadyuzu-72ff5cd4452b51648d91f952c5820cc9b6dfab68.tar
yuzu-72ff5cd4452b51648d91f952c5820cc9b6dfab68.tar.gz
yuzu-72ff5cd4452b51648d91f952c5820cc9b6dfab68.tar.bz2
yuzu-72ff5cd4452b51648d91f952c5820cc9b6dfab68.tar.lz
yuzu-72ff5cd4452b51648d91f952c5820cc9b6dfab68.tar.xz
yuzu-72ff5cd4452b51648d91f952c5820cc9b6dfab68.tar.zst
yuzu-72ff5cd4452b51648d91f952c5820cc9b6dfab68.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp3
-rw-r--r--src/yuzu/multiplayer/state.cpp7
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();
}