diff --git a/Source/Core/DolphinQt/Config/ConfigControls/ConfigChoice.cpp b/Source/Core/DolphinQt/Config/ConfigControls/ConfigChoice.cpp index de82f319d5..3c77b2bc3a 100644 --- a/Source/Core/DolphinQt/Config/ConfigControls/ConfigChoice.cpp +++ b/Source/Core/DolphinQt/Config/ConfigControls/ConfigChoice.cpp @@ -45,8 +45,8 @@ ConfigStringChoice::ConfigStringChoice(const std::vectorcurrentIndex()); + m_adapter_combo = new ToolTipComboBox; m_enable_vsync = new ConfigBool(tr("V-Sync"), Config::GFX_VSYNC, m_game_layer); m_enable_fullscreen = @@ -169,14 +171,17 @@ void GeneralWidget::ConnectWidgets() Config::SetBaseOrCurrent(Config::GFX_ADAPTER, index); emit BackendChanged(QString::fromStdString(Config::Get(Config::MAIN_GFX_BACKEND))); }); - connect(m_aspect_combo, qOverload(&QComboBox::currentIndexChanged), this, [&](int index) { - const bool is_custom_aspect_ratio = (index == static_cast(AspectMode::Custom)) || - (index == static_cast(AspectMode::CustomStretch)); - m_custom_aspect_label->setHidden(!is_custom_aspect_ratio); - m_custom_aspect_width->setHidden(!is_custom_aspect_ratio); - m_custom_aspect_height->setHidden(!is_custom_aspect_ratio); - }); - m_aspect_combo->currentIndexChanged(m_aspect_combo->currentIndex()); + connect(m_aspect_combo, &QComboBox::currentIndexChanged, this, + &GeneralWidget::ToggleCustomAspectRatio); +} + +void GeneralWidget::ToggleCustomAspectRatio(int index) +{ + const bool is_custom_aspect_ratio = (index == static_cast(AspectMode::Custom)) || + (index == static_cast(AspectMode::CustomStretch)); + m_custom_aspect_label->setHidden(!is_custom_aspect_ratio); + m_custom_aspect_width->setHidden(!is_custom_aspect_ratio); + m_custom_aspect_height->setHidden(!is_custom_aspect_ratio); } void GeneralWidget::BackendWarning() diff --git a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h index 42f74229d8..30849234f3 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h +++ b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h @@ -40,6 +40,7 @@ private: void BackendWarning(); void CreateWidgets(); + void ToggleCustomAspectRatio(int index); void ConnectWidgets(); void AddDescriptions();