From 5fb456f17f7b037bd22409fa02efb590c3be93d1 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Wed, 22 Jan 2020 09:50:31 -0700 Subject: [PATCH] Frontend: Prevent DiskShader option from being selected if HW Shaders are disabled --- src/citra_qt/configuration/configure_enhancements.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/citra_qt/configuration/configure_enhancements.cpp b/src/citra_qt/configuration/configure_enhancements.cpp index 3619adb341..0914d37f4a 100644 --- a/src/citra_qt/configuration/configure_enhancements.cpp +++ b/src/citra_qt/configuration/configure_enhancements.cpp @@ -42,6 +42,8 @@ ConfigureEnhancements::ConfigureEnhancements(QWidget* parent) if (!ui->toggle_preload_textures->isEnabled()) ui->toggle_preload_textures->setChecked(false); }); + + ui->toggle_disk_shader_cache->setEnabled(Settings::values.use_hw_shader); } void ConfigureEnhancements::SetConfiguration() { @@ -52,7 +54,8 @@ void ConfigureEnhancements::SetConfiguration() { ui->toggle_linear_filter->setChecked(Settings::values.filter_mode); ui->layout_combobox->setCurrentIndex(static_cast(Settings::values.layout_option)); ui->swap_screen->setChecked(Settings::values.swap_screen); - ui->toggle_disk_shader_cache->setChecked(Settings::values.use_disk_shader_cache); + ui->toggle_disk_shader_cache->setChecked(Settings::values.use_hw_shader && + Settings::values.use_disk_shader_cache); ui->upright_screen->setChecked(Settings::values.upright_screen); ui->toggle_dump_textures->setChecked(Settings::values.dump_textures); ui->toggle_custom_textures->setChecked(Settings::values.custom_textures); @@ -101,7 +104,8 @@ void ConfigureEnhancements::ApplyConfiguration() { Settings::values.layout_option = static_cast(ui->layout_combobox->currentIndex()); Settings::values.swap_screen = ui->swap_screen->isChecked(); - Settings::values.use_disk_shader_cache = ui->toggle_disk_shader_cache->isChecked(); + Settings::values.use_disk_shader_cache = + Settings::values.use_hw_shader && ui->toggle_disk_shader_cache->isChecked(); Settings::values.upright_screen = ui->upright_screen->isChecked(); Settings::values.dump_textures = ui->toggle_dump_textures->isChecked(); Settings::values.custom_textures = ui->toggle_custom_textures->isChecked();