1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

GLideNUI-wtl: Add dithering options

This commit is contained in:
zilmar 2020-04-09 15:17:59 +09:30 committed by Sergey Lipskiy
parent f6bc760e28
commit f802d0fd51
3 changed files with 28 additions and 3 deletions

Binary file not shown.

View File

@ -41,7 +41,10 @@ void _loadSettings(GlSettings & settings)
settings.endGroup();
settings.beginGroup("generalEmulation");
config.generalEmulation.enableNoise = settings.value("enableNoise", config.generalEmulation.enableNoise).toInt();
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();
@ -217,7 +220,10 @@ void writeSettings(const char * _strIniFolder)
settings.endGroup();
settings.beginGroup("generalEmulation");
settings.setValue("enableNoise", config.generalEmulation.enableNoise);
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);
@ -413,7 +419,10 @@ void saveCustomRomSettings(const char * _strIniFolder, const char * _strRomName)
settings.endGroup();
settings.beginGroup("generalEmulation");
WriteCustomSetting(generalEmulation, enableNoise);
WriteCustomSetting(generalEmulation, enableDitheringPattern);
WriteCustomSetting(generalEmulation, enableDitheringQuantization);
WriteCustomSetting(generalEmulation, enableHiresNoiseDithering);
WriteCustomSetting(generalEmulation, rdramImageDitheringMode);
WriteCustomSetting(generalEmulation, enableLOD);
WriteCustomSetting(generalEmulation, enableHWLighting);
WriteCustomSetting(generalEmulation, enableShadersStorage);

View File

@ -63,6 +63,12 @@ BOOL CVideoTab::OnInitDialog(CWindow /*wndFocus*/, LPARAM /*lInitParam*/)
aspectComboBox.AddString(L"Stretch");
aspectComboBox.AddString(L"Try to adjust game to fit");
CComboBox ditheringModeComboBox(GetDlgItem(IDC_CMB_PATTERN));
ditheringModeComboBox.AddString(L"disable");
ditheringModeComboBox.AddString(L"Bayer");
ditheringModeComboBox.AddString(L"Magic square");
ditheringModeComboBox.AddString(L"Blue noise");
SIZE iconSz = { ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON) };
m_AAInfoIcon.SubclassWindow(GetDlgItem(IDC_AA_INFO_ICON));
m_AAInfoIcon.SetIcon(MAKEINTRESOURCE(IDI_ICON_INFO), iconSz.cx, iconSz.cy);
@ -260,6 +266,11 @@ void CVideoTab::LoadSettings(bool /*blockCustomSettings*/)
aspectComboBox.SetCurSel(3);
break;
}
CComboBox(GetDlgItem(IDC_CMB_PATTERN)).SetCurSel(config.generalEmulation.rdramImageDitheringMode);
CButton(GetDlgItem(IDC_CHK_APPLY_TO_OUTPUT)).SetCheck(config.generalEmulation.enableDitheringPattern == 0 ? BST_CHECKED : BST_UNCHECKED);
CButton(GetDlgItem(IDC_CHK_5BIT_QUANTIZATION)).SetCheck(config.generalEmulation.enableDitheringQuantization == 0 ? BST_CHECKED : BST_UNCHECKED);
CButton(GetDlgItem(IDC_CHK_HIRES_NOISE)).SetCheck(config.generalEmulation.enableHiresNoiseDithering == 0 ? BST_CHECKED : BST_UNCHECKED);
}
void CVideoTab::SaveSettings()
@ -332,4 +343,9 @@ void CVideoTab::SaveSettings()
{
config.texture.screenShotFormat = 1;
}
config.generalEmulation.rdramImageDitheringMode = CComboBox(GetDlgItem(IDC_CMB_PATTERN)).GetCurSel();
config.generalEmulation.enableDitheringPattern = CButton(GetDlgItem(IDC_CHK_APPLY_TO_OUTPUT)).GetCheck() == BST_CHECKED ? 1 : 0;
config.generalEmulation.enableDitheringQuantization = CButton(GetDlgItem(IDC_CHK_5BIT_QUANTIZATION)).GetCheck() == BST_CHECKED ? 1 : 0;
config.generalEmulation.enableHiresNoiseDithering = CButton(GetDlgItem(IDC_CHK_HIRES_NOISE)).GetCheck() == BST_CHECKED ? 1 : 0;
}