mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-26 21:10:06 +00:00
citra_qt: Add sample-count to enhancement settings
This commit is contained in:
parent
3c2f825c84
commit
1a9ae7ca18
@ -23,6 +23,8 @@ ConfigureEnhancements::ConfigureEnhancements(QWidget* parent)
|
|||||||
const auto graphics_api = Settings::values.graphics_api.GetValue();
|
const auto graphics_api = Settings::values.graphics_api.GetValue();
|
||||||
const bool res_scale_enabled = graphics_api != Settings::GraphicsAPI::Software;
|
const bool res_scale_enabled = graphics_api != Settings::GraphicsAPI::Software;
|
||||||
ui->resolution_factor_combobox->setEnabled(res_scale_enabled);
|
ui->resolution_factor_combobox->setEnabled(res_scale_enabled);
|
||||||
|
const bool msaa_enabled = graphics_api == Settings::GraphicsAPI::Vulkan;
|
||||||
|
ui->sample_count_combobox->setEnabled(msaa_enabled);
|
||||||
|
|
||||||
connect(ui->render_3d_combobox, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
connect(ui->render_3d_combobox, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||||
[this](int currentIndex) {
|
[this](int currentIndex) {
|
||||||
@ -58,6 +60,8 @@ void ConfigureEnhancements::SetConfiguration() {
|
|||||||
if (!Settings::IsConfiguringGlobal()) {
|
if (!Settings::IsConfiguringGlobal()) {
|
||||||
ConfigurationShared::SetPerGameSetting(ui->resolution_factor_combobox,
|
ConfigurationShared::SetPerGameSetting(ui->resolution_factor_combobox,
|
||||||
&Settings::values.resolution_factor);
|
&Settings::values.resolution_factor);
|
||||||
|
ConfigurationShared::SetPerGameSetting(ui->sample_count_combobox,
|
||||||
|
&Settings::values.sample_count);
|
||||||
ConfigurationShared::SetPerGameSetting(ui->texture_filter_combobox,
|
ConfigurationShared::SetPerGameSetting(ui->texture_filter_combobox,
|
||||||
&Settings::values.texture_filter);
|
&Settings::values.texture_filter);
|
||||||
ConfigurationShared::SetHighlight(ui->widget_texture_filter,
|
ConfigurationShared::SetHighlight(ui->widget_texture_filter,
|
||||||
@ -67,6 +71,8 @@ void ConfigureEnhancements::SetConfiguration() {
|
|||||||
} else {
|
} else {
|
||||||
ui->resolution_factor_combobox->setCurrentIndex(
|
ui->resolution_factor_combobox->setCurrentIndex(
|
||||||
Settings::values.resolution_factor.GetValue());
|
Settings::values.resolution_factor.GetValue());
|
||||||
|
ui->sample_count_combobox->setCurrentIndex(
|
||||||
|
static_cast<int>(Settings::values.sample_count.GetValue()));
|
||||||
ui->layout_combobox->setCurrentIndex(
|
ui->layout_combobox->setCurrentIndex(
|
||||||
static_cast<int>(Settings::values.layout_option.GetValue()));
|
static_cast<int>(Settings::values.layout_option.GetValue()));
|
||||||
ui->texture_filter_combobox->setCurrentIndex(
|
ui->texture_filter_combobox->setCurrentIndex(
|
||||||
@ -136,6 +142,8 @@ void ConfigureEnhancements::RetranslateUI() {
|
|||||||
void ConfigureEnhancements::ApplyConfiguration() {
|
void ConfigureEnhancements::ApplyConfiguration() {
|
||||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.resolution_factor,
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.resolution_factor,
|
||||||
ui->resolution_factor_combobox);
|
ui->resolution_factor_combobox);
|
||||||
|
ConfigurationShared::ApplyPerGameSetting(&Settings::values.sample_count,
|
||||||
|
ui->sample_count_combobox);
|
||||||
Settings::values.render_3d =
|
Settings::values.render_3d =
|
||||||
static_cast<Settings::StereoRenderOption>(ui->render_3d_combobox->currentIndex());
|
static_cast<Settings::StereoRenderOption>(ui->render_3d_combobox->currentIndex());
|
||||||
Settings::values.factor_3d = ui->factor_3d->value();
|
Settings::values.factor_3d = ui->factor_3d->value();
|
||||||
@ -177,6 +185,7 @@ void ConfigureEnhancements::SetupPerGameUI() {
|
|||||||
// Block the global settings if a game is currently running that overrides them
|
// Block the global settings if a game is currently running that overrides them
|
||||||
if (Settings::IsConfiguringGlobal()) {
|
if (Settings::IsConfiguringGlobal()) {
|
||||||
ui->widget_resolution->setEnabled(Settings::values.resolution_factor.UsingGlobal());
|
ui->widget_resolution->setEnabled(Settings::values.resolution_factor.UsingGlobal());
|
||||||
|
ui->widget_sample_count->setEnabled(Settings::values.sample_count.UsingGlobal());
|
||||||
ui->widget_texture_filter->setEnabled(Settings::values.texture_filter.UsingGlobal());
|
ui->widget_texture_filter->setEnabled(Settings::values.texture_filter.UsingGlobal());
|
||||||
ui->toggle_linear_filter->setEnabled(Settings::values.filter_mode.UsingGlobal());
|
ui->toggle_linear_filter->setEnabled(Settings::values.filter_mode.UsingGlobal());
|
||||||
ui->toggle_swap_screen->setEnabled(Settings::values.swap_screen.UsingGlobal());
|
ui->toggle_swap_screen->setEnabled(Settings::values.swap_screen.UsingGlobal());
|
||||||
@ -213,6 +222,10 @@ void ConfigureEnhancements::SetupPerGameUI() {
|
|||||||
ui->resolution_factor_combobox, ui->widget_resolution,
|
ui->resolution_factor_combobox, ui->widget_resolution,
|
||||||
static_cast<int>(Settings::values.resolution_factor.GetValue(true)));
|
static_cast<int>(Settings::values.resolution_factor.GetValue(true)));
|
||||||
|
|
||||||
|
ConfigurationShared::SetColoredComboBox(
|
||||||
|
ui->sample_count_combobox, ui->widget_sample_count,
|
||||||
|
static_cast<int>(Settings::values.sample_count.GetValue(true)));
|
||||||
|
|
||||||
ConfigurationShared::SetColoredComboBox(
|
ConfigurationShared::SetColoredComboBox(
|
||||||
ui->texture_filter_combobox, ui->widget_texture_filter,
|
ui->texture_filter_combobox, ui->widget_texture_filter,
|
||||||
static_cast<int>(Settings::values.texture_filter.GetValue(true)));
|
static_cast<int>(Settings::values.texture_filter.GetValue(true)));
|
||||||
|
@ -110,6 +110,55 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget_sample_count" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<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="sample_count_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Sample count</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="sample_count_combobox">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Native (x1)</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>x2</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>x4</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>x8</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="toggle_linear_filter">
|
<widget class="QCheckBox" name="toggle_linear_filter">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Loading…
Reference in New Issue
Block a user