summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-08-30 08:47:50 -0300
committerGravatar Yuri Kunde Schlesner2015-09-03 15:09:50 -0300
commitcd817be92216c631f7e44e1e64e29fe8a2d4cec4 (patch)
tree86c144d8b95d15f5610c8f2857c7767b04960cd3
parentMerge pull request #1087 from yuriks/opengl-glad (diff)
downloadyuzu-cd817be92216c631f7e44e1e64e29fe8a2d4cec4.tar.gz
yuzu-cd817be92216c631f7e44e1e64e29fe8a2d4cec4.tar.xz
yuzu-cd817be92216c631f7e44e1e64e29fe8a2d4cec4.zip
citra-qt: Move system shutdown to run inside EmuThread
This stops (for some reason sporadic) crashes and OpenGL errors during shutdown, when the OpenGL renderer tries to clean up objects from the UI thread, which has no OpenGL context active.
-rw-r--r--src/citra_qt/bootmanager.cpp3
-rw-r--r--src/citra_qt/main.cpp3
2 files changed, 3 insertions, 3 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp
index d9bacfc3d..9aec16506 100644
--- a/src/citra_qt/bootmanager.cpp
+++ b/src/citra_qt/bootmanager.cpp
@@ -72,6 +72,9 @@ void EmuThread::run() {
72 } 72 }
73 } 73 }
74 74
75 // Shutdown the core emulation
76 System::Shutdown();
77
75 MicroProfileOnThreadExit(); 78 MicroProfileOnThreadExit();
76 79
77 render_window->moveContext(); 80 render_window->moveContext();
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 7fb1b0dcb..11813a2a8 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -283,9 +283,6 @@ void GMainWindow::ShutdownGame() {
283 emu_thread->wait(); 283 emu_thread->wait();
284 emu_thread = nullptr; 284 emu_thread = nullptr;
285 285
286 // Shutdown the core emulation
287 System::Shutdown();
288
289 // Update the GUI 286 // Update the GUI
290 ui.action_Start->setEnabled(false); 287 ui.action_Start->setEnabled(false);
291 ui.action_Start->setText(tr("Start")); 288 ui.action_Start->setText(tr("Start"));