summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Morph2023-01-09 16:21:27 -0500
committerGravatar GitHub2023-01-09 16:21:27 -0500
commit3be83121207f771de8d7806b309d5b10a394b3e7 (patch)
tree14e1e46ae48584c7f18197e8ec7b9ace10de8b08 /src
parentMerge pull request #9583 from FernandoS27/fuck-ogl-already (diff)
parentqt: additional fixes for reentrant shutdown (diff)
downloadyuzu-3be83121207f771de8d7806b309d5b10a394b3e7.tar.gz
yuzu-3be83121207f771de8d7806b309d5b10a394b3e7.tar.xz
yuzu-3be83121207f771de8d7806b309d5b10a394b3e7.zip
Merge pull request #9569 from liamwhite/shutdown-wars
qt: additional fixes for reentrant shutdown
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index c55f81c2f..2ea3b7d59 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1839,9 +1839,11 @@ void GMainWindow::OnEmulationStopTimeExpired() {
1839 1839
1840void GMainWindow::OnEmulationStopped() { 1840void GMainWindow::OnEmulationStopped() {
1841 shutdown_timer.stop(); 1841 shutdown_timer.stop();
1842 emu_thread->disconnect(); 1842 if (emu_thread) {
1843 emu_thread->wait(); 1843 emu_thread->disconnect();
1844 emu_thread = nullptr; 1844 emu_thread->wait();
1845 emu_thread.reset();
1846 }
1845 1847
1846 if (shutdown_dialog) { 1848 if (shutdown_dialog) {
1847 shutdown_dialog->deleteLater(); 1849 shutdown_dialog->deleteLater();
@@ -3029,6 +3031,8 @@ void GMainWindow::OnStopGame() {
3029 3031
3030 if (OnShutdownBegin()) { 3032 if (OnShutdownBegin()) {
3031 OnShutdownBeginDialog(); 3033 OnShutdownBeginDialog();
3034 } else {
3035 OnEmulationStopped();
3032 } 3036 }
3033} 3037}
3034 3038