HostDisplay: Add stretch option

This commit is contained in:
Connor McLaughlin
2021-02-27 13:53:03 +10:00
parent f18babb97e
commit e17d37b8bc
10 changed files with 65 additions and 21 deletions

View File

@ -35,6 +35,8 @@ DisplaySettingsWidget::DisplaySettingsWidget(QtHostInterface* host_interface, QW
"LinearFiltering");
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayIntegerScaling, "Display",
"IntegerScaling");
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayStretch, "Display",
"Stretch");
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.vsync, "Display", "VSync");
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.displayAllFrames, "Display", "DisplayAllFrames",
false);
@ -99,6 +101,9 @@ DisplaySettingsWidget::DisplaySettingsWidget(QtHostInterface* host_interface, QW
m_ui.displayIntegerScaling, tr("Integer Upscaling"), tr("Unchecked"),
tr("Adds padding to the display area to ensure that the ratio between pixels on the host to "
"pixels in the console is an integer number. <br>May result in a sharper image in some 2D games."));
dialog->registerWidgetHelp(
m_ui.displayIntegerScaling, tr("Stretch To Fill"), tr("Unchecked"),
tr("Fills the window with the active display area, regardless of the aspect ratio."));
dialog->registerWidgetHelp(
m_ui.vsync, tr("VSync"), tr("Checked"),
tr("Enable this option to match DuckStation's refresh rate with your current monitor or screen. "
@ -268,4 +273,5 @@ void DisplaySettingsWidget::onGPUFullscreenModeIndexChanged()
void DisplaySettingsWidget::onIntegerFilteringChanged()
{
m_ui.displayLinearFiltering->setEnabled(!m_ui.displayIntegerScaling->isChecked());
}
m_ui.displayStretch->setEnabled(!m_ui.displayIntegerScaling->isChecked());
}