mirror of
https://github.com/blawar/GLideN64.git
synced 2024-06-25 22:09:35 +00:00
Add gamma correction settings to GUI.
This commit is contained in:
parent
d55463a11e
commit
063010365b
|
@ -202,6 +202,10 @@ void ConfigDialog::_init()
|
|||
ui->bloomThresholdSlider->setValue(config.bloomFilter.thresholdLevel);
|
||||
ui->blurAmountSlider->setValue(config.bloomFilter.blurAmount);
|
||||
ui->blurStrengthSlider->setValue(config.bloomFilter.blurStrength);
|
||||
|
||||
ui->forceGammaCorrectionCheckBox->setChecked(config.gammaCorrection.force != 0);
|
||||
ui->gammaLevelSpinBox->setValue(config.gammaCorrection.level);
|
||||
ui->gammaLevelSpinBox->setEnabled(ui->forceGammaCorrectionCheckBox->isChecked());
|
||||
}
|
||||
|
||||
void ConfigDialog::_getTranslations(QStringList & _translationFiles) const
|
||||
|
@ -362,6 +366,9 @@ void ConfigDialog::accept()
|
|||
config.bloomFilter.blurAmount = ui->blurAmountSlider->value();
|
||||
config.bloomFilter.blurStrength = ui->blurStrengthSlider->value();
|
||||
|
||||
config.gammaCorrection.force = ui->forceGammaCorrectionCheckBox->isChecked() ? 1 : 0;
|
||||
config.gammaCorrection.level = ui->gammaLevelSpinBox->value();
|
||||
|
||||
writeSettings(m_strIniPath);
|
||||
|
||||
QDialog::accept();
|
||||
|
|
|
@ -93,6 +93,11 @@ void _loadSettings(QSettings & settings)
|
|||
config.bloomFilter.blurAmount = settings.value("blurAmount", config.bloomFilter.blurAmount).toInt();
|
||||
config.bloomFilter.blurStrength = settings.value("blurStrength", config.bloomFilter.blurStrength).toInt();
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("gammaCorrection");
|
||||
config.gammaCorrection.force = settings.value("force", config.gammaCorrection.force).toInt();
|
||||
config.gammaCorrection.level = settings.value("level", config.gammaCorrection.level).toFloat();
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
void loadSettings(const QString & _strIniFolder)
|
||||
|
@ -186,6 +191,11 @@ void writeSettings(const QString & _strIniFolder)
|
|||
settings.setValue("blurAmount", config.bloomFilter.blurAmount);
|
||||
settings.setValue("blurStrength", config.bloomFilter.blurStrength);
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("gammaCorrection");
|
||||
settings.setValue("force", config.gammaCorrection.force);
|
||||
settings.setValue("level", config.gammaCorrection.level);
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
static
|
||||
|
|
|
@ -1273,7 +1273,103 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_3" native="true"/>
|
||||
<widget class="QGroupBox" name="gammaCorrectionGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Gamma correction</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="forceGammaCorrectionCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Gamma correction.</span></p><p>Some N64 games use gamma correction. Gamma correction makes image brighter. N64 applies gamma correction in its Video Interface. </p><p>GLideN64 emulates gamma correction as post-processing effect. That is, it works only when frame buffer emulation enabled. Gamma correction enabled automatically for games, which use it on real N64. You may force gamma correction for all games and increase default level of gamma correction.</p><p>[Recommended: <span style=" font-style:italic;">use defaults</span>]</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Force gamma correction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Gamma correction.</span></p><p>Some N64 games use gamma correction. Gamma correction makes image brighter. N64 applies gamma correction in its Video Interface. </p><p>GLideN64 emulates gamma correction as post-processing effect. That is, it works only when frame buffer emulation enabled. Gamma correction enabled automatically for games, which use it on real N64. You may force gamma correction for all games. Default level of gamma correction is 2, as on N64.</p><p>[Recommended: <span style=" font-style:italic;">use defaults</span>]</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Gamma correction level:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="gammaLevelSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Gamma correction.</span></p><p>Some N64 games use gamma correction. Gamma correction makes image brighter. N64 applies gamma correction in its Video Interface. </p><p>GLideN64 emulates gamma correction as post-processing effect. That is, it works only when frame buffer emulation enabled. Gamma correction enabled automatically for games, which use it on real N64. You may force gamma correction for all games. Default level of gamma correction is 2, as on N64.</p><p>[Recommended: <span style=" font-style:italic;">use defaults</span>]</p></body></html></string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>4.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>2.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_4" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
@ -1305,8 +1401,8 @@
|
|||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>342</x>
|
||||
<y>519</y>
|
||||
<x>351</x>
|
||||
<y>602</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>316</x>
|
||||
|
@ -1321,8 +1417,8 @@
|
|||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>322</x>
|
||||
<y>519</y>
|
||||
<x>331</x>
|
||||
<y>602</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>276</x>
|
||||
|
@ -1341,7 +1437,7 @@
|
|||
<y>291</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>338</x>
|
||||
<x>459</x>
|
||||
<y>290</y>
|
||||
</hint>
|
||||
</hints>
|
||||
|
@ -1357,7 +1453,7 @@
|
|||
<y>187</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>338</x>
|
||||
<x>459</x>
|
||||
<y>186</y>
|
||||
</hint>
|
||||
</hints>
|
||||
|
@ -1373,8 +1469,8 @@
|
|||
<y>96</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>309</x>
|
||||
<y>106</y>
|
||||
<x>459</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
@ -1389,8 +1485,8 @@
|
|||
<y>126</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>306</x>
|
||||
<y>130</y>
|
||||
<x>459</x>
|
||||
<y>148</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
@ -1405,17 +1501,33 @@
|
|||
<y>161</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>307</x>
|
||||
<y>163</y>
|
||||
<x>459</x>
|
||||
<y>181</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>forceGammaCorrectionCheckBox</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>gammaLevelSpinBox</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>102</x>
|
||||
<y>226</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>173</x>
|
||||
<y>258</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="aspectButtonGroup"/>
|
||||
<buttongroup name="screenshotButtonGroup"/>
|
||||
<buttongroup name="bilinearButtonGroup"/>
|
||||
<buttongroup name="bloomBlendModeButtonGroup"/>
|
||||
<buttongroup name="copyFrameBufferButtonGroup"/>
|
||||
<buttongroup name="bloomBlendModeButtonGroup"/>
|
||||
<buttongroup name="bilinearButtonGroup"/>
|
||||
<buttongroup name="aspectButtonGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
|
Loading…
Reference in New Issue
Block a user