|
|
|
|
@ -213,6 +213,10 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|
|
|
|
&GraphicsSettingsWidget::updatePGXPSettingsEnabled);
|
|
|
|
|
connect(m_ui.pgxpDepthBuffer, &QCheckBox::checkStateChanged, this,
|
|
|
|
|
&GraphicsSettingsWidget::updatePGXPSettingsEnabled);
|
|
|
|
|
connect(m_ui.resetPGXPGeometryTolerance, &QPushButton::clicked, this,
|
|
|
|
|
&GraphicsSettingsWidget::onResetPGXPGeometryToleranceClicked);
|
|
|
|
|
connect(m_ui.resetPGXPDepthClearThreshold, &QPushButton::clicked, this,
|
|
|
|
|
&GraphicsSettingsWidget::onResetPGXPDepthClearThresholdClicked);
|
|
|
|
|
|
|
|
|
|
SettingWidgetBinder::SetAvailability(m_ui.pgxpTextureCorrection,
|
|
|
|
|
!m_dialog->hasGameTrait(GameDatabase::Trait::DisablePGXPTextureCorrection));
|
|
|
|
|
@ -982,8 +986,10 @@ void GraphicsSettingsWidget::updatePGXPSettingsEnabled()
|
|
|
|
|
m_ui.pgxpVertexCache->setEnabled(enabled && !m_dialog->hasGameTrait(GameDatabase::Trait::ForcePGXPVertexCache));
|
|
|
|
|
m_ui.pgxpGeometryTolerance->setEnabled(enabled);
|
|
|
|
|
m_ui.pgxpGeometryToleranceLabel->setEnabled(enabled);
|
|
|
|
|
m_ui.resetPGXPGeometryTolerance->setEnabled(enabled);
|
|
|
|
|
m_ui.pgxpDepthClearThreshold->setEnabled(depth_enabled);
|
|
|
|
|
m_ui.pgxpDepthClearThresholdLabel->setEnabled(depth_enabled);
|
|
|
|
|
m_ui.resetPGXPDepthClearThreshold->setEnabled(depth_enabled);
|
|
|
|
|
m_ui.pgxpDisableOn2DPolygons->setEnabled(enabled &&
|
|
|
|
|
!m_dialog->hasGameTrait(GameDatabase::Trait::DisablePGXPOn2DPolygons));
|
|
|
|
|
m_ui.pgxpTransparentDepthTest->setEnabled(depth_enabled);
|
|
|
|
|
@ -1104,6 +1110,25 @@ void GraphicsSettingsWidget::onFineCropResetClicked()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GraphicsSettingsWidget::onResetPGXPGeometryToleranceClicked()
|
|
|
|
|
{
|
|
|
|
|
m_dialog->setFloatSettingValue("GPU", "PGXPTolerance",
|
|
|
|
|
m_dialog->isPerGameSettings() ? std::nullopt : std::make_optional(-1.0f));
|
|
|
|
|
SettingWidgetBinder::DisconnectWidget(m_ui.pgxpGeometryTolerance);
|
|
|
|
|
SettingWidgetBinder::BindWidgetToFloatSetting(m_dialog->getSettingsInterface(), m_ui.pgxpGeometryTolerance, "GPU",
|
|
|
|
|
"PGXPTolerance", -1.0f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GraphicsSettingsWidget::onResetPGXPDepthClearThresholdClicked()
|
|
|
|
|
{
|
|
|
|
|
m_dialog->setFloatSettingValue(
|
|
|
|
|
"GPU", "PGXPDepthThreshold",
|
|
|
|
|
m_dialog->isPerGameSettings() ? std::nullopt : std::make_optional(Settings::DEFAULT_GPU_PGXP_DEPTH_THRESHOLD));
|
|
|
|
|
SettingWidgetBinder::DisconnectWidget(m_ui.pgxpDepthClearThreshold);
|
|
|
|
|
SettingWidgetBinder::BindWidgetToFloatSetting(m_dialog->getSettingsInterface(), m_ui.pgxpDepthClearThreshold, "GPU",
|
|
|
|
|
"PGXPDepthThreshold", Settings::DEFAULT_GPU_PGXP_DEPTH_THRESHOLD);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GraphicsSettingsWidget::onEnableTextureCacheChanged()
|
|
|
|
|
{
|
|
|
|
|
const bool tc_enabled = m_dialog->getEffectiveBoolValue("GPU", "EnableTextureCache", false);
|
|
|
|
|
|