From 827b69816f583e2353065d167daaab896560433d Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Thu, 2 Apr 2020 14:53:48 +0700 Subject: [PATCH] Add support in GUI --- src/Config.h | 2 +- src/GLideNUI/ConfigDialog.cpp | 6 ++ src/GLideNUI/Settings.cpp | 9 ++ src/GLideNUI/configDialog.ui | 155 ++++++++++++++++++---------------- 4 files changed, 96 insertions(+), 76 deletions(-) diff --git a/src/Config.h b/src/Config.h index eb0d10d4..fed7a1ad 100644 --- a/src/Config.h +++ b/src/Config.h @@ -54,9 +54,9 @@ struct Config }; struct { - u32 enableHiresNoiseDithering; u32 enableDitheringPattern; u32 enableDitheringQuantization; + u32 enableHiresNoiseDithering; u32 rdramImageDitheringMode; u32 enableLOD; u32 enableHWLighting; diff --git a/src/GLideNUI/ConfigDialog.cpp b/src/GLideNUI/ConfigDialog.cpp index 9323fc89..cd4a9b22 100644 --- a/src/GLideNUI/ConfigDialog.cpp +++ b/src/GLideNUI/ConfigDialog.cpp @@ -143,6 +143,9 @@ void ConfigDialog::_init(bool reInit, bool blockCustomSettings) } ui->ditheringModeComboBox->setCurrentIndex(config.generalEmulation.rdramImageDitheringMode); + ui->ditheringQuantizationCheckBox->setChecked(config.generalEmulation.enableDitheringQuantization); + ui->hiresNoiseDitheringCheckBox->setChecked(config.generalEmulation.enableHiresNoiseDithering); + ui->ditheringPatternCheckBox->setChecked(config.generalEmulation.enableDitheringPattern); switch (config.texture.screenShotFormat) { case 0: @@ -445,6 +448,9 @@ void ConfigDialog::accept(bool justSave) { config.texture.bilinearMode = BILINEAR_3POINT; config.generalEmulation.rdramImageDitheringMode = ui->ditheringModeComboBox->currentIndex(); + config.generalEmulation.enableDitheringQuantization = ui->ditheringQuantizationCheckBox->isChecked() ? 1 : 0; + config.generalEmulation.enableHiresNoiseDithering = ui->hiresNoiseDitheringCheckBox->isChecked() ? 1 : 0; + config.generalEmulation.enableDitheringPattern = ui->ditheringPatternCheckBox->isChecked() ? 1 : 0; if (ui->pngRadioButton->isChecked()) config.texture.screenShotFormat = 0; diff --git a/src/GLideNUI/Settings.cpp b/src/GLideNUI/Settings.cpp index 99c252e9..68dd7a9b 100644 --- a/src/GLideNUI/Settings.cpp +++ b/src/GLideNUI/Settings.cpp @@ -41,6 +41,9 @@ void _loadSettings(QSettings & settings) settings.beginGroup("generalEmulation"); config.generalEmulation.enableDitheringPattern = settings.value("enableDitheringPattern", config.generalEmulation.enableDitheringPattern).toInt(); + config.generalEmulation.enableDitheringQuantization = settings.value("enableDitheringQuantization", config.generalEmulation.enableDitheringQuantization).toInt(); + config.generalEmulation.enableHiresNoiseDithering = settings.value("enableHiresNoiseDithering", config.generalEmulation.enableHiresNoiseDithering).toInt(); + config.generalEmulation.rdramImageDitheringMode = settings.value("rdramImageDitheringMode", config.generalEmulation.rdramImageDitheringMode).toInt(); config.generalEmulation.enableLOD = settings.value("enableLOD", config.generalEmulation.enableLOD).toInt(); config.generalEmulation.enableHWLighting = settings.value("enableHWLighting", config.generalEmulation.enableHWLighting).toInt(); config.generalEmulation.enableShadersStorage = settings.value("enableShadersStorage", config.generalEmulation.enableShadersStorage).toInt(); @@ -213,6 +216,9 @@ void writeSettings(const QString & _strIniFolder) settings.beginGroup("generalEmulation"); settings.setValue("enableDitheringPattern", config.generalEmulation.enableDitheringPattern); + settings.setValue("enableDitheringQuantization", config.generalEmulation.enableDitheringQuantization); + settings.setValue("enableHiresNoiseDithering", config.generalEmulation.enableHiresNoiseDithering); + settings.setValue("rdramImageDitheringMode", config.generalEmulation.rdramImageDitheringMode); settings.setValue("enableLOD", config.generalEmulation.enableLOD); settings.setValue("enableHWLighting", config.generalEmulation.enableHWLighting); settings.setValue("enableShadersStorage", config.generalEmulation.enableShadersStorage); @@ -403,6 +409,9 @@ void saveCustomRomSettings(const QString & _strIniFolder, const char * _strRomNa settings.beginGroup("generalEmulation"); WriteCustomSetting(generalEmulation, enableDitheringPattern); + WriteCustomSetting(generalEmulation, enableDitheringQuantization); + WriteCustomSetting(generalEmulation, enableHiresNoiseDithering); + WriteCustomSetting(generalEmulation, rdramImageDitheringMode); WriteCustomSetting(generalEmulation, enableLOD); WriteCustomSetting(generalEmulation, enableHWLighting); WriteCustomSetting(generalEmulation, enableShadersStorage); diff --git a/src/GLideNUI/configDialog.ui b/src/GLideNUI/configDialog.ui index 2b5d8748..ec631904 100644 --- a/src/GLideNUI/configDialog.ui +++ b/src/GLideNUI/configDialog.ui @@ -872,81 +872,6 @@ - - - - Dithering - - - - - - - 5 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - Dithering pattern on output image - - - - - - - High resolution noise dithering - - - - - - - RDRAM image dithering mode: - - - - - - - - disable - - - - - Bayer - - - - - Magic square - - - - - Blue noise - - - - - - - @@ -1455,6 +1380,86 @@ + + + + Dithering + + + + + + <html><head/><body><p>Tooltip to be here.</p></body></html> + + + Enable 5bit quantization + + + + + + + <html><head/><body><p>Tooltip to be here.</p></body></html> + + + High resolution noise dithering + + + + + + + <html><head/><body><p>Tooltip to be here.</p></body></html> + + + Dithering pattern on output image + + + + + + + + + <html><head/><body><p>Tooltip to be here.</p></body></html> + + + RDRAM image dithering: + + + + + + + <html><head/><body><p>Tooltip to be here.</p></body></html> + + + + disable + + + + + Bayer + + + + + Magic square + + + + + Blue noise + + + + + + + + +