mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 07:25:47 -04:00
@ -22,11 +22,25 @@ GPUSettingsWidget::GPUSettingsWidget(QtHostInterface* host_interface, QWidget* p
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.vsync, "Display/VSync");
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(m_host_interface, m_ui.resolutionScale, "GPU/ResolutionScale");
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.trueColor, "GPU/TrueColor");
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.scaledDithering, "GPU/ScaledDithering");
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.linearTextureFiltering, "GPU/TextureFiltering");
|
||||
|
||||
connect(m_ui.resolutionScale, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&GPUSettingsWidget::updateScaledDitheringEnabled);
|
||||
connect(m_ui.trueColor, &QCheckBox::stateChanged, this, &GPUSettingsWidget::updateScaledDitheringEnabled);
|
||||
updateScaledDitheringEnabled();
|
||||
}
|
||||
|
||||
GPUSettingsWidget::~GPUSettingsWidget() = default;
|
||||
|
||||
void GPUSettingsWidget::updateScaledDitheringEnabled()
|
||||
{
|
||||
const int resolution_scale = m_ui.resolutionScale->currentIndex();
|
||||
const bool true_color = m_ui.trueColor->isChecked();
|
||||
const bool allow_scaled_dithering = (resolution_scale != 1 && !true_color);
|
||||
m_ui.scaledDithering->setEnabled(allow_scaled_dithering);
|
||||
}
|
||||
|
||||
void GPUSettingsWidget::setupAdditionalUi()
|
||||
{
|
||||
for (u32 i = 0; i < static_cast<u32>(GPURenderer::Count); i++)
|
||||
|
@ -14,6 +14,9 @@ public:
|
||||
GPUSettingsWidget(QtHostInterface* host_interface, QWidget* parent = nullptr);
|
||||
~GPUSettingsWidget();
|
||||
|
||||
private Q_SLOTS:
|
||||
void updateScaledDitheringEnabled();
|
||||
|
||||
private:
|
||||
void setupAdditionalUi();
|
||||
|
||||
|
@ -123,6 +123,13 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="scaledDithering">
|
||||
<property name="text">
|
||||
<string>Scaled Dithering (scale dither pattern to resolution)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="linearTextureFiltering">
|
||||
<property name="text">
|
||||
<string>Bilinear Texture Filtering</string>
|
||||
|
Reference in New Issue
Block a user