diff options
| author | TryTwo <taolas@gmail.com> | 2025-05-02 15:32:37 -0700 |
|---|---|---|
| committer | TryTwo <taolas@gmail.com> | 2025-05-02 18:21:18 -0700 |
| commit | 1aabae49ed033d0f9c3742e842a742a0b4bcb733 (patch) | |
| tree | 9d184fea61a942c3cd6908e2461f746964d53f5b /Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp | |
| parent | 63572f15fc92363307914614ec5ad409570f8f50 (diff) | |
Settings: Bugfix. Remove Aspect Ratio combobox signal so it doesn't trigger a settings changed save.
Diffstat (limited to 'Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp index b698fbdd77..51c07066d3 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp @@ -79,6 +79,8 @@ void GeneralWidget::CreateWidgets() Config::GFX_CUSTOM_ASPECT_RATIO_WIDTH, m_game_layer); m_custom_aspect_height = new ConfigInteger(1, MAX_CUSTOM_ASPECT_RATIO_RESOLUTION, Config::GFX_CUSTOM_ASPECT_RATIO_HEIGHT, m_game_layer); + ToggleCustomAspectRatio(m_aspect_combo->currentIndex()); + 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<int>(&QComboBox::currentIndexChanged), this, [&](int index) { - const bool is_custom_aspect_ratio = (index == static_cast<int>(AspectMode::Custom)) || - (index == static_cast<int>(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<int>(AspectMode::Custom)) || + (index == static_cast<int>(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() |
