Merge pull request #24 from Cacodemon345/qt
Make "No ROMs found" message identical to Win32
This commit is contained in:
@@ -83,7 +83,7 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
pc_init(argc, argv);
|
||||
if (! pc_init_modules()) {
|
||||
ui_msgbox_header(MBX_FATAL, VC(L"No ROMs found."), VC(L"86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory."));
|
||||
ui_msgbox_header(MBX_FATAL, VC(L"No ROMs found."), VC(L"86Box could not find any usable ROM images.\n\nPlease <a href='https://github.com/86Box/roms/releases/latest'>download</a> a ROM set and extract it into the \"roms\" directory."));
|
||||
return 6;
|
||||
}
|
||||
|
||||
|
@@ -864,6 +864,7 @@ void MainWindow::showMessage(const QString& header, const QString& message) {
|
||||
|
||||
void MainWindow::showMessage_(const QString &header, const QString &message) {
|
||||
QMessageBox box(QMessageBox::Warning, header, message, QMessageBox::NoButton, this);
|
||||
box.setTextFormat(Qt::TextFormat::RichText);
|
||||
box.exec();
|
||||
}
|
||||
|
||||
|
@@ -63,7 +63,9 @@ int ui_msgbox_header(int flags, void *header, void* message) {
|
||||
|
||||
// any error in early init
|
||||
if (main_window == nullptr) {
|
||||
QMessageBox::critical(nullptr, hdr, msg);
|
||||
QMessageBox msgBox(QMessageBox::Icon::Critical, hdr, msg);
|
||||
msgBox.setTextFormat(Qt::TextFormat::RichText);
|
||||
msgBox.exec();
|
||||
} else {
|
||||
// else scope it to main_window
|
||||
main_window->showMessage(hdr, msg);
|
||||
|
Reference in New Issue
Block a user