From 1b0c08cad23285d299937661cd5bf5471db43314 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 12 Dec 2024 21:21:49 +0100 Subject: [PATCH] Prevent selecting Vulkan renderer in Qt frontend and present a message --- src/panda_qt/config_window.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/panda_qt/config_window.cpp b/src/panda_qt/config_window.cpp index 5065ffa13..a4e43f529 100644 --- a/src/panda_qt/config_window.cpp +++ b/src/panda_qt/config_window.cpp @@ -190,8 +190,18 @@ ConfigWindow::ConfigWindow(ConfigCallback configCallback, MainWindowCallback win rendererType->addItem(tr("Vulkan")); rendererType->setCurrentIndex(static_cast(config.rendererType)); connect(rendererType, &QComboBox::currentIndexChanged, this, [&](int index) { - config.rendererType = static_cast(index); - updateConfig(); + auto type = static_cast(index); + + if (type == RendererType::Vulkan) { + QMessageBox messageBox( + QMessageBox::Icon::Critical, tr("Vulkan renderer unavailable"), + tr("Qt UI doesn't currently support Vulkan, try again at a later time") + ); + messageBox.exec(); + } else { + config.rendererType = type; + updateConfig(); + } }); gpuLayout->addRow(tr("GPU renderer"), rendererType);