Merge branch 'master' into multimonitor-take2-ui
This commit is contained in:
@@ -38,6 +38,7 @@ extern "C" {
|
||||
#include <86box/config.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/ui.h>
|
||||
#include <86box/discord.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/machine.h>
|
||||
@@ -1524,18 +1525,25 @@ void MainWindow::refreshMediaMenu() {
|
||||
ui->actionMCA_devices->setVisible(machine_has_bus(machine, MACHINE_BUS_MCA));
|
||||
}
|
||||
|
||||
void MainWindow::showMessage(const QString& header, const QString& message) {
|
||||
void MainWindow::showMessage(int flags, const QString& header, const QString& message) {
|
||||
if (QThread::currentThread() == this->thread()) {
|
||||
showMessage_(header, message);
|
||||
showMessage_(flags, header, message);
|
||||
} else {
|
||||
emit showMessageForNonQtThread(header, message);
|
||||
emit showMessageForNonQtThread(flags, header, message);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::showMessage_(const QString &header, const QString &message) {
|
||||
void MainWindow::showMessage_(int flags, const QString &header, const QString &message) {
|
||||
QMessageBox box(QMessageBox::Warning, header, message, QMessageBox::NoButton, this);
|
||||
if (flags & (MBX_FATAL)) {
|
||||
box.setIcon(QMessageBox::Critical);
|
||||
}
|
||||
else if (!(flags & (MBX_ERROR | MBX_WARNING))) {
|
||||
box.setIcon(QMessageBox::Warning);
|
||||
}
|
||||
box.setTextFormat(Qt::TextFormat::RichText);
|
||||
box.exec();
|
||||
if (cpu_thread_run == 0) QApplication::exit(-1);
|
||||
}
|
||||
|
||||
void MainWindow::keyPressEvent(QKeyEvent* event)
|
||||
|
||||
Reference in New Issue
Block a user