summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/configuration_shared.h1
-rw-r--r--src/yuzu/configuration/configure_graphics_advanced.cpp87
-rw-r--r--src/yuzu/configuration/configure_graphics_advanced.ui154
3 files changed, 146 insertions, 96 deletions
diff --git a/src/yuzu/configuration/configuration_shared.h b/src/yuzu/configuration/configuration_shared.h
index 4b52834c4..71011fd92 100644
--- a/src/yuzu/configuration/configuration_shared.h
+++ b/src/yuzu/configuration/configuration_shared.h
@@ -33,6 +33,7 @@ struct Trackers {
CheckState use_vsync;
CheckState use_assembly_shaders;
+ CheckState use_asynchronous_shaders;
CheckState use_fast_gpu_time;
CheckState force_30fps_mode;
} extern trackers;
diff --git a/src/yuzu/configuration/configure_graphics_advanced.cpp b/src/yuzu/configuration/configure_graphics_advanced.cpp
index ce30188cd..fbeaeccbc 100644
--- a/src/yuzu/configuration/configure_graphics_advanced.cpp
+++ b/src/yuzu/configuration/configure_graphics_advanced.cpp
@@ -28,32 +28,25 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
ui->force_30fps_mode->setEnabled(runtime_lock);
ui->anisotropic_filtering_combobox->setEnabled(runtime_lock);
+ ui->use_vsync->setChecked(Settings::values.use_vsync.GetValue());
+ ui->use_assembly_shaders->setChecked(Settings::values.use_assembly_shaders.GetValue());
+ ui->use_asynchronous_shaders->setChecked(Settings::values.use_asynchronous_shaders.GetValue());
+ ui->use_fast_gpu_time->setChecked(Settings::values.use_fast_gpu_time.GetValue());
+ ui->force_30fps_mode->setChecked(Settings::values.force_30fps_mode.GetValue());
+
if (Settings::configuring_global) {
ui->gpu_accuracy->setCurrentIndex(
static_cast<int>(Settings::values.gpu_accuracy.GetValue()));
- ui->use_vsync->setChecked(Settings::values.use_vsync.GetValue());
- ui->use_assembly_shaders->setChecked(Settings::values.use_assembly_shaders.GetValue());
- ui->use_asynchronous_shaders->setChecked(
- Settings::values.use_asynchronous_shaders.GetValue());
- ui->use_fast_gpu_time->setChecked(Settings::values.use_fast_gpu_time.GetValue());
- ui->force_30fps_mode->setChecked(Settings::values.force_30fps_mode.GetValue());
ui->anisotropic_filtering_combobox->setCurrentIndex(
Settings::values.max_anisotropy.GetValue());
} else {
ConfigurationShared::SetPerGameSetting(ui->gpu_accuracy, &Settings::values.gpu_accuracy);
- ConfigurationShared::SetPerGameSetting(ui->use_vsync, &Settings::values.use_vsync);
- ConfigurationShared::SetPerGameSetting(ui->use_assembly_shaders,
- &Settings::values.use_assembly_shaders);
- ConfigurationShared::SetPerGameSetting(ui->use_asynchronous_shaders,
- &Settings::values.use_asynchronous_shaders);
- ConfigurationShared::SetPerGameSetting(ui->use_asynchronous_shaders,
- &Settings::values.use_asynchronous_shaders);
- ConfigurationShared::SetPerGameSetting(ui->use_fast_gpu_time,
- &Settings::values.use_fast_gpu_time);
- ConfigurationShared::SetPerGameSetting(ui->force_30fps_mode,
- &Settings::values.force_30fps_mode);
ConfigurationShared::SetPerGameSetting(ui->anisotropic_filtering_combobox,
&Settings::values.max_anisotropy);
+ ConfigurationShared::SetHighlight(ui->gpu_accuracy_layout, "gpu_accuracy_layout",
+ !Settings::values.gpu_accuracy.UsingGlobal());
+ ConfigurationShared::SetHighlight(ui->af_layout, "af_layout",
+ !Settings::values.max_anisotropy.UsingGlobal());
}
}
@@ -95,17 +88,20 @@ void ConfigureGraphicsAdvanced::ApplyConfiguration() {
} else {
ConfigurationShared::ApplyPerGameSetting(&Settings::values.max_anisotropy,
ui->anisotropic_filtering_combobox);
- ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_vsync, ui->use_vsync);
- ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_assembly_shaders,
- ui->use_assembly_shaders);
- ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_asynchronous_shaders,
- ui->use_asynchronous_shaders);
- ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_asynchronous_shaders,
- ui->use_asynchronous_shaders);
+ ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_vsync, ui->use_vsync,
+ ConfigurationShared::trackers.use_vsync);
+ ConfigurationShared::ApplyPerGameSetting(
+ &Settings::values.use_assembly_shaders, ui->use_assembly_shaders,
+ ConfigurationShared::trackers.use_assembly_shaders);
+ ConfigurationShared::ApplyPerGameSetting(
+ &Settings::values.use_asynchronous_shaders, ui->use_asynchronous_shaders,
+ ConfigurationShared::trackers.use_asynchronous_shaders);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_fast_gpu_time,
- ui->use_fast_gpu_time);
+ ui->use_fast_gpu_time,
+ ConfigurationShared::trackers.use_fast_gpu_time);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.force_30fps_mode,
- ui->force_30fps_mode);
+ ui->force_30fps_mode,
+ ConfigurationShared::trackers.force_30fps_mode);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.max_anisotropy,
ui->anisotropic_filtering_combobox);
@@ -146,11 +142,36 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() {
return;
}
- ConfigurationShared::InsertGlobalItem(ui->gpu_accuracy);
- ui->use_vsync->setTristate(true);
- ui->use_assembly_shaders->setTristate(true);
- ui->use_asynchronous_shaders->setTristate(true);
- ui->use_fast_gpu_time->setTristate(true);
- ui->force_30fps_mode->setTristate(true);
- ConfigurationShared::InsertGlobalItem(ui->anisotropic_filtering_combobox);
+ ConfigurationShared::SetColoredTristate(ui->use_vsync, "use_vsync", Settings::values.use_vsync,
+ ConfigurationShared::trackers.use_vsync);
+ ConfigurationShared::SetColoredTristate(ui->use_assembly_shaders, "use_assembly_shaders",
+ Settings::values.use_assembly_shaders,
+ ConfigurationShared::trackers.use_assembly_shaders);
+ ConfigurationShared::SetColoredTristate(ui->use_assembly_shaders, "use_asynchronous_shaders",
+ Settings::values.use_asynchronous_shaders,
+ ConfigurationShared::trackers.use_asynchronous_shaders);
+ ConfigurationShared::SetColoredTristate(ui->use_fast_gpu_time, "use_fast_gpu_time",
+ Settings::values.use_fast_gpu_time,
+ ConfigurationShared::trackers.use_fast_gpu_time);
+ ConfigurationShared::SetColoredTristate(ui->force_30fps_mode, "force_30fps_mode",
+ Settings::values.force_30fps_mode,
+ ConfigurationShared::trackers.force_30fps_mode);
+ ConfigurationShared::InsertGlobalItem(
+ ui->gpu_accuracy,
+ ui->gpu_accuracy->itemText(static_cast<int>(Settings::values.gpu_accuracy.GetValue(true))));
+ ConfigurationShared::InsertGlobalItem(
+ ui->anisotropic_filtering_combobox,
+ ui->anisotropic_filtering_combobox->itemText(
+ static_cast<int>(Settings::values.max_anisotropy.GetValue(true))));
+
+ connect(ui->gpu_accuracy, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this,
+ [this](int index) {
+ ConfigurationShared::SetHighlight(ui->gpu_accuracy_layout, "gpu_accuracy_layout",
+ index != 0);
+ });
+
+ connect(ui->anisotropic_filtering_combobox,
+ static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, [this](int index) {
+ ConfigurationShared::SetHighlight(ui->af_layout, "af_layout", index != 0);
+ });
}
diff --git a/src/yuzu/configuration/configure_graphics_advanced.ui b/src/yuzu/configuration/configure_graphics_advanced.ui
index 71e7dfe5e..6a0d29c27 100644
--- a/src/yuzu/configuration/configure_graphics_advanced.ui
+++ b/src/yuzu/configuration/configure_graphics_advanced.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
+ <width>404</width>
<height>321</height>
</rect>
</property>
@@ -23,34 +23,48 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="label_gpu_accuracy">
- <property name="text">
- <string>Accuracy Level:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="gpu_accuracy">
- <item>
+ <widget class="QWidget" name="gpu_accuracy_layout" native="true">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_gpu_accuracy">
<property name="text">
- <string notr="true">Normal</string>
+ <string>Accuracy Level:</string>
</property>
- </item>
- <item>
- <property name="text">
- <string notr="true">High</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string notr="true">Extreme(very slow)</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="gpu_accuracy">
+ <item>
+ <property name="text">
+ <string notr="true">Normal</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">High</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string notr="true">Extreme(very slow)</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</item>
<item>
<widget class="QCheckBox" name="use_vsync">
@@ -97,44 +111,58 @@
</widget>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_1">
- <item>
- <widget class="QLabel" name="af_label">
- <property name="text">
- <string>Anisotropic Filtering:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="anisotropic_filtering_combobox">
- <item>
- <property name="text">
- <string>Default</string>
- </property>
- </item>
- <item>
+ <widget class="QWidget" name="af_layout" native="true">
+ <layout class="QHBoxLayout" name="horizontalLayout_1">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="af_label">
<property name="text">
- <string>2x</string>
+ <string>Anisotropic Filtering:</string>
</property>
- </item>
- <item>
- <property name="text">
- <string>4x</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>8x</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>16x</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="anisotropic_filtering_combobox">
+ <item>
+ <property name="text">
+ <string>Default</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>2x</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>4x</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>8x</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>16x</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</item>
</layout>
</widget>