summaryrefslogtreecommitdiff
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra_qt/main.cpp')
-rw-r--r--src/citra_qt/main.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index da9ea6c91..d2ba3f9db 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -259,9 +259,34 @@ void GMainWindow::BootGame(const std::string& filename) {
259 System::Init(render_window); 259 System::Init(render_window);
260 260
261 // Load the game 261 // Load the game
262 if (Loader::ResultStatus::Success != Loader::LoadFile(filename)) { 262 Loader::ResultStatus result = Loader::LoadFile(filename);
263 if (Loader::ResultStatus::Success != result) {
263 LOG_CRITICAL(Frontend, "Failed to load ROM!"); 264 LOG_CRITICAL(Frontend, "Failed to load ROM!");
264 System::Shutdown(); 265 System::Shutdown();
266
267 switch (result) {
268 case Loader::ResultStatus::ErrorEncrypted: {
269 // Build the MessageBox ourselves to have clickable link
270 QMessageBox popup_error;
271 popup_error.setTextFormat(Qt::RichText);
272 popup_error.setWindowTitle(tr("Error while loading ROM !"));
273 popup_error.setText(tr("The ROM is probably encrypted !<br/><br/>"
274 "Please check: <a href='https://github.com/citra-emu/citra/wiki/Dumping-Game-Cartridges'>https://github.com/citra-emu/citra/wiki/Dumping-Game-Cartridges</a>"));
275 popup_error.setIcon(QMessageBox::Critical);
276 popup_error.exec();
277 break;
278 }
279 case Loader::ResultStatus::ErrorInvalidFormat:
280 QMessageBox::critical(this, tr("Error while loading ROM !"),
281 tr("The ROM format is not supported."));
282 break;
283 case Loader::ResultStatus::Error:
284
285 default:
286 QMessageBox::critical(this, tr("Error while loading ROM !"),
287 tr("Unknown error !"));
288 break;
289 }
265 return; 290 return;
266 } 291 }
267 292