Skip to content

Commit

Permalink
Merge pull request #684 from twvd/msg
Browse files Browse the repository at this point in the history
Prevent selecting Vulkan renderer in Qt frontend and present a message
  • Loading branch information
wheremyfoodat authored Dec 12, 2024
2 parents 7257f34 + 1b0c08c commit 3787358
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/panda_qt/config_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,18 @@ ConfigWindow::ConfigWindow(ConfigCallback configCallback, MainWindowCallback win
rendererType->addItem(tr("Vulkan"));
rendererType->setCurrentIndex(static_cast<int>(config.rendererType));
connect(rendererType, &QComboBox::currentIndexChanged, this, [&](int index) {
config.rendererType = static_cast<RendererType>(index);
updateConfig();
auto type = static_cast<RendererType>(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);

Expand Down

0 comments on commit 3787358

Please sign in to comment.