From 74af414b966950fc872cbddc05b8083fe29fef95 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 29 Jan 2020 21:14:19 -0800 Subject: [PATCH] Qt: Fix extraneous dialog (fixes #1654) --- CHANGES | 1 + src/platform/qt/CoreManager.cpp | 1 + src/platform/qt/Window.cpp | 5 ++--- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index ba58c3907..6181f1273 100644 --- a/CHANGES +++ b/CHANGES @@ -21,6 +21,7 @@ Other fixes: - Qt: Fix missing OSD messages - Qt: Fix crash unloading shaders - Qt: Fix toggled actions on gamepads (fixes mgba.io/i/1650) + - Qt: Fix extraneous dialog (fixes mgba.io/i/1654) 0.8.0: (2020-01-21) Features: diff --git a/src/platform/qt/CoreManager.cpp b/src/platform/qt/CoreManager.cpp index a77334cc5..6b2580d3c 100644 --- a/src/platform/qt/CoreManager.cpp +++ b/src/platform/qt/CoreManager.cpp @@ -83,6 +83,7 @@ CoreController* CoreManager::loadGame(VFile* vf, const QString& path, const QStr mCore* core = mCoreFindVF(vf); if (!core) { + LOG(QT, ERROR) << tr("Could not load game. Are you sure it's in the correct format?"); return nullptr; } diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 957c1dfdd..677ebad24 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -860,8 +860,8 @@ void Window::gameCrashed(const QString& errorMessage) { } void Window::gameFailed() { - QMessageBox* fail = new QMessageBox(QMessageBox::Warning, tr("Couldn't Load"), - tr("Could not load game. Are you sure it's in the correct format?"), + QMessageBox* fail = new QMessageBox(QMessageBox::Warning, tr("Couldn't Start"), + tr("Could not start game."), QMessageBox::Ok, this, Qt::Sheet); fail->setAttribute(Qt::WA_DeleteOnClose); fail->show(); @@ -1788,7 +1788,6 @@ void Window::updateFrame() { void Window::setController(CoreController* controller, const QString& fname) { if (!controller) { - gameFailed(); return; } if (m_pendingClose) {