mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 00:38:59 -05:00
Renderer: Implement Bicubic and ScaleForce filters.
This commit is contained in:
@ -825,6 +825,7 @@ void Config::ReadRendererValues() {
|
||||
ReadGlobalSetting(Settings::values.fullscreen_mode);
|
||||
ReadGlobalSetting(Settings::values.aspect_ratio);
|
||||
ReadGlobalSetting(Settings::values.resolution_setup);
|
||||
ReadGlobalSetting(Settings::values.scaling_filter);
|
||||
ReadGlobalSetting(Settings::values.max_anisotropy);
|
||||
ReadGlobalSetting(Settings::values.use_speed_limit);
|
||||
ReadGlobalSetting(Settings::values.speed_limit);
|
||||
@ -1371,6 +1372,10 @@ void Config::SaveRendererValues() {
|
||||
static_cast<u32>(Settings::values.resolution_setup.GetValue(global)),
|
||||
static_cast<u32>(Settings::values.resolution_setup.GetDefault()),
|
||||
Settings::values.resolution_setup.UsingGlobal());
|
||||
WriteSetting(QString::fromStdString(Settings::values.scaling_filter.GetLabel()),
|
||||
static_cast<u32>(Settings::values.scaling_filter.GetValue(global)),
|
||||
static_cast<u32>(Settings::values.scaling_filter.GetDefault()),
|
||||
Settings::values.scaling_filter.UsingGlobal());
|
||||
WriteGlobalSetting(Settings::values.max_anisotropy);
|
||||
WriteGlobalSetting(Settings::values.use_speed_limit);
|
||||
WriteGlobalSetting(Settings::values.speed_limit);
|
||||
|
@ -190,5 +190,6 @@ Q_DECLARE_METATYPE(Settings::GPUAccuracy);
|
||||
Q_DECLARE_METATYPE(Settings::FullscreenMode);
|
||||
Q_DECLARE_METATYPE(Settings::NvdecEmulation);
|
||||
Q_DECLARE_METATYPE(Settings::ResolutionSetup);
|
||||
Q_DECLARE_METATYPE(Settings::ScalingFilter);
|
||||
Q_DECLARE_METATYPE(Settings::RendererBackend);
|
||||
Q_DECLARE_METATYPE(Settings::ShaderBackend);
|
||||
|
@ -89,6 +89,7 @@ void ConfigureGraphics::SetConfiguration() {
|
||||
ui->use_asynchronous_gpu_emulation->setEnabled(runtime_lock);
|
||||
ui->use_disk_shader_cache->setEnabled(runtime_lock);
|
||||
ui->nvdec_emulation_widget->setEnabled(runtime_lock);
|
||||
ui->resolution_combobox->setEnabled(runtime_lock);
|
||||
ui->accelerate_astc->setEnabled(runtime_lock);
|
||||
ui->use_disk_shader_cache->setChecked(Settings::values.use_disk_shader_cache.GetValue());
|
||||
ui->use_asynchronous_gpu_emulation->setChecked(
|
||||
@ -104,6 +105,8 @@ void ConfigureGraphics::SetConfiguration() {
|
||||
ui->aspect_ratio_combobox->setCurrentIndex(Settings::values.aspect_ratio.GetValue());
|
||||
ui->resolution_combobox->setCurrentIndex(
|
||||
static_cast<int>(Settings::values.resolution_setup.GetValue()));
|
||||
ui->scaling_filter_combobox->setCurrentIndex(
|
||||
static_cast<int>(Settings::values.scaling_filter.GetValue()));
|
||||
} else {
|
||||
ConfigurationShared::SetPerGameSetting(ui->api, &Settings::values.renderer_backend);
|
||||
ConfigurationShared::SetHighlight(ui->api_widget,
|
||||
@ -129,6 +132,11 @@ void ConfigureGraphics::SetConfiguration() {
|
||||
ConfigurationShared::SetHighlight(ui->resolution_label,
|
||||
!Settings::values.resolution_setup.UsingGlobal());
|
||||
|
||||
ConfigurationShared::SetPerGameSetting(ui->scaling_filter_combobox,
|
||||
&Settings::values.scaling_filter);
|
||||
ConfigurationShared::SetHighlight(ui->scaling_filter_label,
|
||||
!Settings::values.scaling_filter.UsingGlobal());
|
||||
|
||||
ui->bg_combobox->setCurrentIndex(Settings::values.bg_red.UsingGlobal() ? 0 : 1);
|
||||
ui->bg_button->setEnabled(!Settings::values.bg_red.UsingGlobal());
|
||||
ConfigurationShared::SetHighlight(ui->bg_layout, !Settings::values.bg_red.UsingGlobal());
|
||||
@ -144,6 +152,10 @@ void ConfigureGraphics::ApplyConfiguration() {
|
||||
ui->resolution_combobox->currentIndex() -
|
||||
((Settings::IsConfiguringGlobal()) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET));
|
||||
|
||||
const auto scaling_filter = static_cast<Settings::ScalingFilter>(
|
||||
ui->scaling_filter_combobox->currentIndex() -
|
||||
((Settings::IsConfiguringGlobal()) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET));
|
||||
|
||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.fullscreen_mode,
|
||||
ui->fullscreen_mode_combobox);
|
||||
ConfigurationShared::ApplyPerGameSetting(&Settings::values.aspect_ratio,
|
||||
@ -178,6 +190,9 @@ void ConfigureGraphics::ApplyConfiguration() {
|
||||
if (Settings::values.resolution_setup.UsingGlobal()) {
|
||||
Settings::values.resolution_setup.SetValue(resolution_setup);
|
||||
}
|
||||
if (Settings::values.scaling_filter.UsingGlobal()) {
|
||||
Settings::values.scaling_filter.SetValue(scaling_filter);
|
||||
}
|
||||
} else {
|
||||
if (ui->resolution_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||
Settings::values.resolution_setup.SetGlobal(true);
|
||||
@ -185,6 +200,12 @@ void ConfigureGraphics::ApplyConfiguration() {
|
||||
Settings::values.resolution_setup.SetGlobal(false);
|
||||
Settings::values.resolution_setup.SetValue(resolution_setup);
|
||||
}
|
||||
if (ui->scaling_filter_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||
Settings::values.scaling_filter.SetGlobal(true);
|
||||
} else {
|
||||
Settings::values.scaling_filter.SetGlobal(false);
|
||||
Settings::values.scaling_filter.SetValue(scaling_filter);
|
||||
}
|
||||
if (ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||
Settings::values.renderer_backend.SetGlobal(true);
|
||||
Settings::values.shader_backend.SetGlobal(true);
|
||||
@ -333,6 +354,7 @@ void ConfigureGraphics::SetupPerGameUI() {
|
||||
ui->fullscreen_mode_combobox->setEnabled(Settings::values.fullscreen_mode.UsingGlobal());
|
||||
ui->aspect_ratio_combobox->setEnabled(Settings::values.aspect_ratio.UsingGlobal());
|
||||
ui->resolution_combobox->setEnabled(Settings::values.resolution_setup.UsingGlobal());
|
||||
ui->scaling_filter_combobox->setEnabled(Settings::values.scaling_filter.UsingGlobal());
|
||||
ui->use_asynchronous_gpu_emulation->setEnabled(
|
||||
Settings::values.use_asynchronous_gpu_emulation.UsingGlobal());
|
||||
ui->nvdec_emulation->setEnabled(Settings::values.nvdec_emulation.UsingGlobal());
|
||||
@ -364,6 +386,9 @@ void ConfigureGraphics::SetupPerGameUI() {
|
||||
ConfigurationShared::SetColoredComboBox(
|
||||
ui->resolution_combobox, ui->resolution_label,
|
||||
static_cast<int>(Settings::values.resolution_setup.GetValue(true)));
|
||||
ConfigurationShared::SetColoredComboBox(
|
||||
ui->scaling_filter_combobox, ui->scaling_filter_label,
|
||||
static_cast<int>(Settings::values.scaling_filter.GetValue(true)));
|
||||
ConfigurationShared::InsertGlobalItem(
|
||||
ui->api, static_cast<int>(Settings::values.renderer_backend.GetValue(true)));
|
||||
ConfigurationShared::InsertGlobalItem(
|
||||
|
@ -338,21 +338,11 @@
|
||||
<string>0.5X (360p/540p)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0.75X (540p/810p)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1X (720p/1080p)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1.5X (1080p/1620p)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2X (1440p/2160[4K]p)</string>
|
||||
@ -373,6 +363,50 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="scaling_filter_layout" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<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="scaling_filter_label">
|
||||
<property name="text">
|
||||
<string>Window Adapting Filter:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="scaling_filter_combobox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bilinear</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bicubic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ScaleForce</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="bg_layout" native="true">
|
||||
<property name="sizePolicy">
|
||||
|
Reference in New Issue
Block a user