1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Support dithering mode in GUI.

This commit is contained in:
Sergey Lipskiy 2020-03-16 19:38:22 +07:00
parent d621eb4d34
commit f566c1bc59
3 changed files with 72 additions and 0 deletions

View File

@ -142,6 +142,8 @@ void ConfigDialog::_init(bool reInit, bool blockCustomSettings)
break; break;
} }
ui->ditheringModeComboBox->setCurrentIndex(config.generalEmulation.ditheringMode);
switch (config.texture.screenShotFormat) { switch (config.texture.screenShotFormat) {
case 0: case 0:
ui->pngRadioButton->setChecked(true); ui->pngRadioButton->setChecked(true);
@ -443,6 +445,8 @@ void ConfigDialog::accept(bool justSave) {
else if (ui->blnr3PointRadioButton->isChecked()) else if (ui->blnr3PointRadioButton->isChecked())
config.texture.bilinearMode = BILINEAR_3POINT; config.texture.bilinearMode = BILINEAR_3POINT;
config.generalEmulation.ditheringMode = ui->ditheringModeComboBox->currentIndex();
if (ui->pngRadioButton->isChecked()) if (ui->pngRadioButton->isChecked())
config.texture.screenShotFormat = 0; config.texture.screenShotFormat = 0;
else if (ui->jpegRadioButton->isChecked()) else if (ui->jpegRadioButton->isChecked())

View File

@ -214,6 +214,7 @@ void writeSettings(const QString & _strIniFolder)
settings.beginGroup("generalEmulation"); settings.beginGroup("generalEmulation");
settings.setValue("enableNoise", config.generalEmulation.enableNoise); settings.setValue("enableNoise", config.generalEmulation.enableNoise);
settings.setValue("ditheringMode", config.generalEmulation.ditheringMode);
settings.setValue("enableLOD", config.generalEmulation.enableLOD); settings.setValue("enableLOD", config.generalEmulation.enableLOD);
settings.setValue("enableHWLighting", config.generalEmulation.enableHWLighting); settings.setValue("enableHWLighting", config.generalEmulation.enableHWLighting);
settings.setValue("enableShadersStorage", config.generalEmulation.enableShadersStorage); settings.setValue("enableShadersStorage", config.generalEmulation.enableShadersStorage);
@ -404,6 +405,7 @@ void saveCustomRomSettings(const QString & _strIniFolder, const char * _strRomNa
settings.beginGroup("generalEmulation"); settings.beginGroup("generalEmulation");
WriteCustomSetting(generalEmulation, enableNoise); WriteCustomSetting(generalEmulation, enableNoise);
WriteCustomSetting(generalEmulation, ditheringMode);
WriteCustomSetting(generalEmulation, enableLOD); WriteCustomSetting(generalEmulation, enableLOD);
WriteCustomSetting(generalEmulation, enableHWLighting); WriteCustomSetting(generalEmulation, enableHWLighting);
WriteCustomSetting(generalEmulation, enableShadersStorage); WriteCustomSetting(generalEmulation, enableShadersStorage);

View File

@ -872,6 +872,72 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QGroupBox" name="ditheringGroupBox">
<property name="title">
<string>Dithering</string>
</property>
<layout class="QVBoxLayout" name="ditheringGroupBoxVerticalLayout">
<item>
<widget class="QFrame" name="ditheringFrame">
<layout class="QVBoxLayout" name="ditheringFrameVerticalLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="ditheringLabel">
<property name="text">
<string>Dithering mode:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="ditheringModeComboBox">
<item>
<property name="text">
<string>disable</string>
</property>
</item>
<item>
<property name="text">
<string>only noise dithering (default)</string>
</property>
</item>
<item>
<property name="text">
<string>noise dithering with 5bit quantization</string>
</property>
</item>
<item>
<property name="text">
<string>noise and ordered grid dithering</string>
</property>
</item>
<item>
<property name="text">
<string>dithering with 5bit quantization</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_14"> <layout class="QHBoxLayout" name="horizontalLayout_14">
<property name="spacing"> <property name="spacing">