qt: Make "Failed to init Vulkan" error translatable

This commit is contained in:
Alexander Babikov
2025-04-08 12:01:05 +05:00
parent 890362131d
commit ba6694f9f2
3 changed files with 8 additions and 1 deletions

View File

@@ -39,6 +39,7 @@
#include <QScreen>
#include <QMessageBox>
#include <QTouchEvent>
#include <QStringBuilder>
#ifdef __APPLE__
# include <CoreGraphics/CoreGraphics.h>
@@ -393,7 +394,7 @@ RendererStack::createRenderer(Renderer renderer)
});
connect(hw, &VulkanWindowRenderer::errorInitializing, [=]() {
/* Renderer could not initialize, fallback to software. */
auto msgBox = new QMessageBox(QMessageBox::Critical, "86Box", QString("Failed to initialize Vulkan renderer.\nFalling back to software rendering."), QMessageBox::Ok);
auto msgBox = new QMessageBox(QMessageBox::Critical, "86Box", tr("Failed to initialize Vulkan renderer.") % tr("\nFalling back to software rendering."), QMessageBox::Ok);
msgBox->setAttribute(Qt::WA_DeleteOnClose);
msgBox->show();
imagebufs = {};