From b1b6f08926322b6841796d1d9e2b87cbc9052d83 Mon Sep 17 00:00:00 2001 From: Vitor K Date: Wed, 2 Aug 2023 16:38:57 -0300 Subject: [PATCH] citra_qt: fix two graphics configuration bugs (#6840) --- src/citra_qt/configuration/configure_graphics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/citra_qt/configuration/configure_graphics.cpp b/src/citra_qt/configuration/configure_graphics.cpp index 300a2736d8..3951728e96 100644 --- a/src/citra_qt/configuration/configure_graphics.cpp +++ b/src/citra_qt/configuration/configure_graphics.cpp @@ -13,6 +13,7 @@ ConfigureGraphics::ConfigureGraphics(bool is_powered_on, QWidget* parent) ui->setupUi(this); ui->toggle_vsync_new->setEnabled(!is_powered_on); + ui->graphics_api_combo->setEnabled(!is_powered_on); // Set the index to -1 to ensure the below lambda is called with setCurrentIndex ui->graphics_api_combo->setCurrentIndex(-1); @@ -28,9 +29,10 @@ ConfigureGraphics::ConfigureGraphics(bool is_powered_on, QWidget* parent) }); connect(ui->toggle_hw_shader, &QCheckBox::toggled, this, [this] { + const bool enabled = ui->toggle_hw_shader->isEnabled(); const bool checked = ui->toggle_hw_shader->isChecked(); - ui->hw_shader_group->setEnabled(checked); - ui->toggle_disk_shader_cache->setEnabled(checked); + ui->hw_shader_group->setEnabled(checked && enabled); + ui->toggle_disk_shader_cache->setEnabled(checked && enabled); }); SetupPerGameUI();