mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 22:35:39 +00:00
Settings: Make integer and linear upscaling mutually exclusive
This commit is contained in:
parent
91092847f8
commit
904680f0df
|
@ -633,6 +633,12 @@ void HostInterface::FixIncompatibleSettings(bool display_osd_messages)
|
||||||
g_settings.bios_patch_tty_enable = false;
|
g_settings.bios_patch_tty_enable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_settings.display_integer_scaling && g_settings.display_linear_filtering)
|
||||||
|
{
|
||||||
|
Log_WarningPrintf("Disabling linear filter due to integer upscaling.");
|
||||||
|
g_settings.display_linear_filtering = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (g_settings.gpu_pgxp_enable)
|
if (g_settings.gpu_pgxp_enable)
|
||||||
{
|
{
|
||||||
if (g_settings.gpu_renderer == GPURenderer::Software)
|
if (g_settings.gpu_renderer == GPURenderer::Software)
|
||||||
|
|
|
@ -55,7 +55,10 @@ DisplaySettingsWidget::DisplaySettingsWidget(QtHostInterface* host_interface, QW
|
||||||
&DisplaySettingsWidget::onGPUAdapterIndexChanged);
|
&DisplaySettingsWidget::onGPUAdapterIndexChanged);
|
||||||
connect(m_ui.fullscreenMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
connect(m_ui.fullscreenMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||||
&DisplaySettingsWidget::onGPUFullscreenModeIndexChanged);
|
&DisplaySettingsWidget::onGPUFullscreenModeIndexChanged);
|
||||||
|
connect(m_ui.displayIntegerScaling, &QCheckBox::stateChanged, this,
|
||||||
|
&DisplaySettingsWidget::onIntegerFilteringChanged);
|
||||||
populateGPUAdaptersAndResolutions();
|
populateGPUAdaptersAndResolutions();
|
||||||
|
onIntegerFilteringChanged();
|
||||||
|
|
||||||
dialog->registerWidgetHelp(
|
dialog->registerWidgetHelp(
|
||||||
m_ui.renderer, tr("Renderer"),
|
m_ui.renderer, tr("Renderer"),
|
||||||
|
@ -68,9 +71,8 @@ DisplaySettingsWidget::DisplaySettingsWidget(QtHostInterface* host_interface, QW
|
||||||
tr("If your system contains multiple GPUs or adapters, you can select which GPU you wish to use for the hardware "
|
tr("If your system contains multiple GPUs or adapters, you can select which GPU you wish to use for the hardware "
|
||||||
"renderers. <br>This option is only supported in Direct3D and Vulkan. OpenGL will always use the default "
|
"renderers. <br>This option is only supported in Direct3D and Vulkan. OpenGL will always use the default "
|
||||||
"device."));
|
"device."));
|
||||||
dialog->registerWidgetHelp(
|
dialog->registerWidgetHelp(m_ui.fullscreenMode, tr("Fullscreen Mode"), tr("Borderless Fullscreen"),
|
||||||
m_ui.fullscreenMode, tr("Fullscreen Mode"), tr("Borderless Fullscreen"),
|
tr("Chooses the fullscreen resolution and frequency."));
|
||||||
tr("Chooses the fullscreen resolution and frequency."));
|
|
||||||
dialog->registerWidgetHelp(
|
dialog->registerWidgetHelp(
|
||||||
m_ui.displayAspectRatio, tr("Aspect Ratio"),
|
m_ui.displayAspectRatio, tr("Aspect Ratio"),
|
||||||
qApp->translate("DisplayAspectRatio", Settings::GetDisplayAspectRatioName(Settings::DEFAULT_DISPLAY_ASPECT_RATIO)),
|
qApp->translate("DisplayAspectRatio", Settings::GetDisplayAspectRatioName(Settings::DEFAULT_DISPLAY_ASPECT_RATIO)),
|
||||||
|
@ -267,3 +269,8 @@ void DisplaySettingsWidget::onGPUFullscreenModeIndexChanged()
|
||||||
m_host_interface->SetStringSettingValue("GPU", "FullscreenMode",
|
m_host_interface->SetStringSettingValue("GPU", "FullscreenMode",
|
||||||
m_ui.fullscreenMode->currentText().toUtf8().constData());
|
m_ui.fullscreenMode->currentText().toUtf8().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DisplaySettingsWidget::onIntegerFilteringChanged()
|
||||||
|
{
|
||||||
|
m_ui.displayLinearFiltering->setEnabled(!m_ui.displayIntegerScaling->isChecked());
|
||||||
|
}
|
|
@ -20,6 +20,7 @@ private Q_SLOTS:
|
||||||
void populateGPUAdaptersAndResolutions();
|
void populateGPUAdaptersAndResolutions();
|
||||||
void onGPUAdapterIndexChanged();
|
void onGPUAdapterIndexChanged();
|
||||||
void onGPUFullscreenModeIndexChanged();
|
void onGPUFullscreenModeIndexChanged();
|
||||||
|
void onIntegerFilteringChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupAdditionalUi();
|
void setupAdditionalUi();
|
||||||
|
|
|
@ -1631,7 +1631,7 @@ void DrawSettingsWindow()
|
||||||
|
|
||||||
settings_changed |=
|
settings_changed |=
|
||||||
ToggleButton("Linear Upscaling", "Uses a bilinear filter when upscaling to display, smoothing out the image.",
|
ToggleButton("Linear Upscaling", "Uses a bilinear filter when upscaling to display, smoothing out the image.",
|
||||||
&s_settings_copy.display_linear_filtering);
|
&s_settings_copy.display_linear_filtering, !s_settings_copy.display_integer_scaling);
|
||||||
|
|
||||||
settings_changed |=
|
settings_changed |=
|
||||||
ToggleButton("Integer Upscaling", "Adds padding to ensure pixels are a whole number in size.",
|
ToggleButton("Integer Upscaling", "Adds padding to ensure pixels are a whole number in size.",
|
||||||
|
|
Loading…
Reference in a new issue