diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index f39da90ba5..43d64b708b 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) { break; default: - if (static_cast(result) > - static_cast(Core::System::ResultStatus::ErrorLoader)) { + if (result > Core::System::ResultStatus::ErrorLoader) { const u16 loader_id = static_cast(Core::System::ResultStatus::ErrorLoader); const u16 error_id = static_cast(result) - loader_id; const std::string error_code = fmt::format("({:04X}-{:04X})", loader_id, error_id); LOG_CRITICAL(Frontend, "Failed to load ROM! {}", error_code); - QMessageBox::critical( - this, - tr("Error while loading ROM! ").append(QString::fromStdString(error_code)), - QString::fromStdString(fmt::format( - "{}
Please follow the " - "yuzu quickstart guide to redump your files.
You can refer " - "to the yuzu wiki or the yuzu Discord for help.", - static_cast(error_id)))); + + const auto title = + tr("Error while loading ROM! %1", "%1 signifies a numeric error code.") + .arg(QString::fromStdString(error_code)); + const auto description = + tr("%1
Please follow the " + "yuzu quickstart guide to redump your files.
You can refer " + "to the yuzu wiki or the yuzu Discord for help.", + "%1 signifies a numeric error ID.") + .arg(error_id); + + QMessageBox::critical(this, title, description); } else { QMessageBox::critical( this, tr("Error while loading ROM!"),