mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-29 09:05:41 +00:00
Qt: Fix per-game custom aspect ratio
This commit is contained in:
parent
b530b08bc4
commit
5fa5957156
|
@ -289,14 +289,22 @@ void DisplaySettingsWidget::onGPUFullscreenModeIndexChanged()
|
||||||
|
|
||||||
void DisplaySettingsWidget::onIntegerFilteringChanged()
|
void DisplaySettingsWidget::onIntegerFilteringChanged()
|
||||||
{
|
{
|
||||||
m_ui.displayLinearFiltering->setEnabled(!m_ui.displayIntegerScaling->isChecked());
|
const bool integer_scaling = m_dialog->getEffectiveBoolValue("Display", "IntegerScaling", false);
|
||||||
m_ui.displayStretch->setEnabled(!m_ui.displayIntegerScaling->isChecked());
|
m_ui.displayLinearFiltering->setEnabled(!integer_scaling);
|
||||||
|
m_ui.displayStretch->setEnabled(!integer_scaling);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplaySettingsWidget::onAspectRatioChanged()
|
void DisplaySettingsWidget::onAspectRatioChanged()
|
||||||
{
|
{
|
||||||
const bool is_custom =
|
const DisplayAspectRatio ratio =
|
||||||
static_cast<DisplayAspectRatio>(m_ui.displayAspectRatio->currentIndex()) == DisplayAspectRatio::Custom;
|
Settings::ParseDisplayAspectRatio(
|
||||||
|
m_dialog
|
||||||
|
->getEffectiveStringValue("Display", "AspectRatio",
|
||||||
|
Settings::GetDisplayAspectRatioName(Settings::DEFAULT_DISPLAY_ASPECT_RATIO))
|
||||||
|
.c_str())
|
||||||
|
.value_or(Settings::DEFAULT_DISPLAY_ASPECT_RATIO);
|
||||||
|
|
||||||
|
const bool is_custom = (ratio == DisplayAspectRatio::Custom);
|
||||||
|
|
||||||
m_ui.customAspectRatioNumerator->setVisible(is_custom);
|
m_ui.customAspectRatioNumerator->setVisible(is_custom);
|
||||||
m_ui.customAspectRatioDenominator->setVisible(is_custom);
|
m_ui.customAspectRatioDenominator->setVisible(is_custom);
|
||||||
|
|
Loading…
Reference in a new issue