diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 719ae0d12d..91149245af 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -2269,6 +2269,7 @@ void GMainWindow::OnCoreError(Core::System::ResultStatus result, std::string det QString status_message; QString title, message; + QMessageBox::Icon error_severity_icon; if (result == Core::System::ResultStatus::ErrorSystemFiles) { const QString common_message = tr("%1 is missing. Please for details." "
Continuing emulation may result in crashes and bugs."); status_message = tr("Fatal Error encountered"); + error_severity_icon = QMessageBox::Icon::Critical; } QMessageBox message_box; message_box.setWindowTitle(title); message_box.setText(message); - message_box.setIcon(QMessageBox::Icon::Critical); - message_box.addButton(tr("Continue"), QMessageBox::RejectRole); - QPushButton* abort_button = message_box.addButton(tr("Abort"), QMessageBox::AcceptRole); - if (result != Core::System::ResultStatus::ShutdownRequested) - message_box.exec(); + message_box.setIcon(error_severity_icon); + if (error_severity_icon == QMessageBox::Icon::Critical) { + message_box.addButton(tr("Continue"), QMessageBox::RejectRole); + QPushButton* abort_button = message_box.addButton(tr("Quit Game"), QMessageBox::AcceptRole); + if (result != Core::System::ResultStatus::ShutdownRequested) + message_box.exec(); - if (result == Core::System::ResultStatus::ShutdownRequested || - message_box.clickedButton() == abort_button) { - if (emu_thread) { - ShutdownGame(); + if (result == Core::System::ResultStatus::ShutdownRequested || + message_box.clickedButton() == abort_button) { + if (emu_thread) { + ShutdownGame(); + return; + } } } else { - // Only show the message if the game is still running. - if (emu_thread) { - emu_thread->SetRunning(true); - message_label->setText(status_message); - message_label->setVisible(true); - message_label_used_for_movie = false; - } + // This block should run when the error isn't too big of a deal + // e.g. when a save state can't be saved or loaded + message_box.addButton(tr("OK"), QMessageBox::RejectRole); + message_box.exec(); + } + + // Only show the message if the game is still running. + if (emu_thread) { + emu_thread->SetRunning(true); + message_label->setText(status_message); + message_label->setVisible(true); + message_label_used_for_movie = false; } }