citra-emu
/
citra-canary
Archived
1
0
Fork 0

Frontend: Prevent DiskShader option from being selected if HW Shaders are disabled

This commit is contained in:
James Rowe 2020-01-22 09:50:31 -07:00
parent bd29261e0a
commit 5fb456f17f
1 changed files with 6 additions and 2 deletions

View File

@ -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<int>(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<Settings::LayoutOption>(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();