summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/yuzu/main.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index f39da90ba..43d64b708 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1045,20 +1045,23 @@ bool GMainWindow::LoadROM(const QString& filename, std::size_t program_index) {
1045 break; 1045 break;
1046 1046
1047 default: 1047 default:
1048 if (static_cast<u32>(result) > 1048 if (result > Core::System::ResultStatus::ErrorLoader) {
1049 static_cast<u32>(Core::System::ResultStatus::ErrorLoader)) {
1050 const u16 loader_id = static_cast<u16>(Core::System::ResultStatus::ErrorLoader); 1049 const u16 loader_id = static_cast<u16>(Core::System::ResultStatus::ErrorLoader);
1051 const u16 error_id = static_cast<u16>(result) - loader_id; 1050 const u16 error_id = static_cast<u16>(result) - loader_id;
1052 const std::string error_code = fmt::format("({:04X}-{:04X})", loader_id, error_id); 1051 const std::string error_code = fmt::format("({:04X}-{:04X})", loader_id, error_id);
1053 LOG_CRITICAL(Frontend, "Failed to load ROM! {}", error_code); 1052 LOG_CRITICAL(Frontend, "Failed to load ROM! {}", error_code);
1054 QMessageBox::critical( 1053
1055 this, 1054 const auto title =
1056 tr("Error while loading ROM! ").append(QString::fromStdString(error_code)), 1055 tr("Error while loading ROM! %1", "%1 signifies a numeric error code.")
1057 QString::fromStdString(fmt::format( 1056 .arg(QString::fromStdString(error_code));
1058 "{}<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the " 1057 const auto description =
1059 "yuzu quickstart guide</a> to redump your files.<br>You can refer " 1058 tr("%1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the "
1060 "to the yuzu wiki</a> or the yuzu Discord</a> for help.", 1059 "yuzu quickstart guide</a> to redump your files.<br>You can refer "
1061 static_cast<Loader::ResultStatus>(error_id)))); 1060 "to the yuzu wiki</a> or the yuzu Discord</a> for help.",
1061 "%1 signifies a numeric error ID.")
1062 .arg(error_id);
1063
1064 QMessageBox::critical(this, title, description);
1062 } else { 1065 } else {
1063 QMessageBox::critical( 1066 QMessageBox::critical(
1064 this, tr("Error while loading ROM!"), 1067 this, tr("Error while loading ROM!"),