configure_graphics_advanced: Implement highlighted overrides
This commit is contained in:
parent
b79a6ebf9c
commit
38152ab0b9
@ -33,6 +33,7 @@ struct Trackers {
|
|||||||
|
|
||||||
CheckState use_vsync;
|
CheckState use_vsync;
|
||||||
CheckState use_assembly_shaders;
|
CheckState use_assembly_shaders;
|
||||||
|
CheckState use_asynchronous_shaders;
|
||||||
CheckState use_fast_gpu_time;
|
CheckState use_fast_gpu_time;
|
||||||
CheckState force_30fps_mode;
|
CheckState force_30fps_mode;
|
||||||
} extern trackers;
|
} extern trackers;
|
||||||
|
@ -28,32 +28,25 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
|
|||||||
ui->force_30fps_mode->setEnabled(runtime_lock);
|
ui->force_30fps_mode->setEnabled(runtime_lock);
|
||||||
ui->anisotropic_filtering_combobox->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) {
|
if (Settings::configuring_global) {
|
||||||
ui->gpu_accuracy->setCurrentIndex(
|
ui->gpu_accuracy->setCurrentIndex(
|
||||||
static_cast<int>(Settings::values.gpu_accuracy.GetValue()));
|
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(
|
ui->anisotropic_filtering_combobox->setCurrentIndex(
|
||||||
Settings::values.max_anisotropy.GetValue());
|
Settings::values.max_anisotropy.GetValue());
|
||||||
} else {
|
} else {
|
||||||
ConfigurationShared::SetPerGameSetting(ui->gpu_accuracy, &Settings::values.gpu_accuracy);
|
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,
|
ConfigurationShared::SetPerGameSetting(ui->anisotropic_filtering_combobox,
|
||||||
&Settings::values.max_anisotropy);
|
&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 {
|
} else {
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.max_anisotropy,
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.max_anisotropy,
|
||||||
ui->anisotropic_filtering_combobox);
|
ui->anisotropic_filtering_combobox);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_vsync, ui->use_vsync);
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_vsync, ui->use_vsync,
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_assembly_shaders,
|
ConfigurationShared::trackers.use_vsync);
|
||||||
ui->use_assembly_shaders);
|
ConfigurationShared::ApplyPerGameSetting(
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_asynchronous_shaders,
|
&Settings::values.use_assembly_shaders, ui->use_assembly_shaders,
|
||||||
ui->use_asynchronous_shaders);
|
ConfigurationShared::trackers.use_assembly_shaders);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_asynchronous_shaders,
|
ConfigurationShared::ApplyPerGameSetting(
|
||||||
ui->use_asynchronous_shaders);
|
&Settings::values.use_asynchronous_shaders, ui->use_asynchronous_shaders,
|
||||||
|
ConfigurationShared::trackers.use_asynchronous_shaders);
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_fast_gpu_time,
|
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,
|
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,
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.max_anisotropy,
|
||||||
ui->anisotropic_filtering_combobox);
|
ui->anisotropic_filtering_combobox);
|
||||||
|
|
||||||
@ -146,11 +142,36 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigurationShared::InsertGlobalItem(ui->gpu_accuracy);
|
ConfigurationShared::SetColoredTristate(ui->use_vsync, "use_vsync", Settings::values.use_vsync,
|
||||||
ui->use_vsync->setTristate(true);
|
ConfigurationShared::trackers.use_vsync);
|
||||||
ui->use_assembly_shaders->setTristate(true);
|
ConfigurationShared::SetColoredTristate(ui->use_assembly_shaders, "use_assembly_shaders",
|
||||||
ui->use_asynchronous_shaders->setTristate(true);
|
Settings::values.use_assembly_shaders,
|
||||||
ui->use_fast_gpu_time->setTristate(true);
|
ConfigurationShared::trackers.use_assembly_shaders);
|
||||||
ui->force_30fps_mode->setTristate(true);
|
ConfigurationShared::SetColoredTristate(ui->use_assembly_shaders, "use_asynchronous_shaders",
|
||||||
ConfigurationShared::InsertGlobalItem(ui->anisotropic_filtering_combobox);
|
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);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>404</width>
|
||||||
<height>321</height>
|
<height>321</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -23,34 +23,48 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<widget class="QWidget" name="gpu_accuracy_layout" native="true">
|
||||||
<item>
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<widget class="QLabel" name="label_gpu_accuracy">
|
<property name="leftMargin">
|
||||||
<property name="text">
|
<number>0</number>
|
||||||
<string>Accuracy Level:</string>
|
</property>
|
||||||
</property>
|
<property name="topMargin">
|
||||||
</widget>
|
<number>0</number>
|
||||||
</item>
|
</property>
|
||||||
<item>
|
<property name="rightMargin">
|
||||||
<widget class="QComboBox" name="gpu_accuracy">
|
<number>0</number>
|
||||||
<item>
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_gpu_accuracy">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">Normal</string>
|
<string>Accuracy Level:</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item>
|
</item>
|
||||||
<property name="text">
|
<item>
|
||||||
<string notr="true">High</string>
|
<widget class="QComboBox" name="gpu_accuracy">
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string notr="true">Normal</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string notr="true">Extreme(very slow)</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
</widget>
|
<string notr="true">High</string>
|
||||||
</item>
|
</property>
|
||||||
</layout>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">Extreme(very slow)</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="use_vsync">
|
<widget class="QCheckBox" name="use_vsync">
|
||||||
@ -97,44 +111,58 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_1">
|
<widget class="QWidget" name="af_layout" native="true">
|
||||||
<item>
|
<layout class="QHBoxLayout" name="horizontalLayout_1">
|
||||||
<widget class="QLabel" name="af_label">
|
<property name="leftMargin">
|
||||||
<property name="text">
|
<number>0</number>
|
||||||
<string>Anisotropic Filtering:</string>
|
</property>
|
||||||
</property>
|
<property name="topMargin">
|
||||||
</widget>
|
<number>0</number>
|
||||||
</item>
|
</property>
|
||||||
<item>
|
<property name="rightMargin">
|
||||||
<widget class="QComboBox" name="anisotropic_filtering_combobox">
|
<number>0</number>
|
||||||
<item>
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="af_label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Default</string>
|
<string>Anisotropic Filtering:</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item>
|
</item>
|
||||||
<property name="text">
|
<item>
|
||||||
<string>2x</string>
|
<widget class="QComboBox" name="anisotropic_filtering_combobox">
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>Default</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>4x</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>2x</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>8x</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>4x</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>16x</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</item>
|
<property name="text">
|
||||||
</widget>
|
<string>8x</string>
|
||||||
</item>
|
</property>
|
||||||
</layout>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>16x</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
Reference in New Issue
Block a user