From ac52b32adb804d1c5b6b78f7a007b055773848d4 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 1 Dec 2021 14:50:49 +0600 Subject: [PATCH] Keep emulator paused while settings is open Reduces crashes --- src/qt/qt_mainwindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index e8c56e530..f70e55147 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -116,7 +116,11 @@ void MainWindow::on_actionExit_triggered() { } void MainWindow::on_actionSettings_triggered() { - Settings settings; + int currentPause = dopause; + plat_pause(1); + Settings settings(this); + settings.setModal(true); + settings.setWindowModality(Qt::WindowModal); settings.exec(); switch (settings.result()) { @@ -135,6 +139,7 @@ void MainWindow::on_actionSettings_triggered() { case QDialog::Rejected: break; } + plat_pause(currentPause); } std::array x11_to_xt_base