From 8e5a96fcfc1c8a1935c2be0bcacfba93aa1adcb0 Mon Sep 17 00:00:00 2001 From: spycrab Date: Thu, 31 May 2018 03:52:18 +0200 Subject: [PATCH] Qt/GeneralWidget: Show tooltip when adapters are not supported by the backend --- Source/Core/DolphinQt2/Config/Graphics/GeneralWidget.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt2/Config/Graphics/GeneralWidget.cpp b/Source/Core/DolphinQt2/Config/Graphics/GeneralWidget.cpp index caff7bc62b..adafde738e 100644 --- a/Source/Core/DolphinQt2/Config/Graphics/GeneralWidget.cpp +++ b/Source/Core/DolphinQt2/Config/Graphics/GeneralWidget.cpp @@ -338,8 +338,15 @@ void GeneralWidget::OnBackendChanged(const QString& backend_name) for (const auto& adapter : adapters) m_adapter_combo->addItem(QString::fromStdString(adapter)); + const bool supports_adapters = !adapters.empty(); + m_adapter_combo->setCurrentIndex(g_Config.iAdapter); - m_adapter_combo->setEnabled(!adapters.empty()); + m_adapter_combo->setEnabled(supports_adapters); + + m_adapter_combo->setToolTip( + supports_adapters ? QStringLiteral("") : + tr("%1 doesn't support this feature.") + .arg(QString::fromStdString(g_video_backend->GetDisplayName()))); m_adapter_combo->blockSignals(old); }