From 5ee5b858d3c6d076d2e12897f4515a2b5796340c Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 5 Nov 2023 02:10:39 +0100 Subject: [PATCH] Fixes to the cpu_override warning dialog handling per the suggestions by lemondrops. --- src/qt/qt_main.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index d025c9168..845ff705f 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -212,14 +212,12 @@ main(int argc, char *argv[]) if (cpu_override) { QMessageBox warningbox(QMessageBox::Icon::Warning, QObject::tr("You are loading an unsupported configuration"), QObject::tr("CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid."), - QMessageBox::NoButton, main_window); + QMessageBox::NoButton); warningbox.addButton(QObject::tr("Continue"), QMessageBox::AcceptRole); warningbox.addButton(QObject::tr("Exit"), QMessageBox::RejectRole); warningbox.exec(); - if (warningbox.result() == QDialog::Accepted) { - confirm_exit_cmdl = 0; /* skip the confirmation prompt without touching the config */ - emit main_window->close(); - } + if (warningbox.result() == QDialog::Accepted) + return 0; } #ifdef DISCORD