From 9b330e41279884ced8b4d3ddaa63e023f4eb31e9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 26 Apr 2022 14:03:24 -0700 Subject: Add an option to alsoft-config for EAX API support --- utils/alsoft-config/mainwindow.cpp | 12 ++++++++++++ utils/alsoft-config/mainwindow.ui | 18 +++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index baecf525..8a179ada 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -347,6 +347,12 @@ MainWindow::MainWindow(QWidget *parent) : ui->enableSSE41CheckBox->setVisible(false); #endif /* !SSE4.1 */ +#endif + +#ifndef ALSOFT_EAX + ui->enableEaxCheck->setChecked(Qt::Unchecked); + ui->enableEaxCheck->setEnabled(false); + ui->enableEaxCheck->setVisible(false); #endif mPeriodSizeValidator = new QIntValidator{64, 8192, this}; @@ -448,6 +454,7 @@ MainWindow::MainWindow(QWidget *parent) : connect(ui->enableDedicatedCheck, &QCheckBox::stateChanged, this, &MainWindow::enableApplyButton); connect(ui->enablePitchShifterCheck, &QCheckBox::stateChanged, this, &MainWindow::enableApplyButton); connect(ui->enableVocalMorpherCheck, &QCheckBox::stateChanged, this, &MainWindow::enableApplyButton); + connect(ui->enableEaxCheck, &QCheckBox::stateChanged, this, &MainWindow::enableApplyButton); connect(ui->pulseAutospawnCheckBox, &QCheckBox::stateChanged, this, &MainWindow::enableApplyButton); connect(ui->pulseAllowMovesCheckBox, &QCheckBox::stateChanged, this, &MainWindow::enableApplyButton); @@ -922,6 +929,8 @@ void MainWindow::loadConfig(const QString &fname) ui->enableDedicatedCheck->setChecked(!excludefx.contains("dedicated", Qt::CaseInsensitive)); ui->enablePitchShifterCheck->setChecked(!excludefx.contains("pshifter", Qt::CaseInsensitive)); ui->enableVocalMorpherCheck->setChecked(!excludefx.contains("vmorpher", Qt::CaseInsensitive)); + if(ui->enableEaxCheck->isEnabled()) + ui->enableEaxCheck->setChecked(getCheckState(settings.value("eax/enable")) != Qt::Unchecked); ui->pulseAutospawnCheckBox->setCheckState(getCheckState(settings.value("pulse/spawn-server"))); ui->pulseAllowMovesCheckBox->setCheckState(getCheckState(settings.value("pulse/allow-moves"))); @@ -1134,6 +1143,9 @@ void MainWindow::saveConfig(const QString &fname) const if(!ui->enableVocalMorpherCheck->isChecked()) strlist.append("vmorpher"); settings.setValue("excludefx", strlist.join(QChar{','})); + settings.setValue("eax/enable", + (!ui->enableEaxCheck->isEnabled() || ui->enableEaxCheck->isChecked()) + ? QString{/*"true"*/} : QString{"false"}); settings.setValue("pulse/spawn-server", getCheckValue(ui->pulseAutospawnCheckBox)); settings.setValue("pulse/allow-moves", getCheckValue(ui->pulseAllowMovesCheckBox)); diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui index ba8f83fb..40a4fdaf 100644 --- a/utils/alsoft-config/mainwindow.ui +++ b/utils/alsoft-config/mainwindow.ui @@ -2110,7 +2110,7 @@ be useful for preventing those extensions from being used. 10 - 100 + 60 511 241 @@ -2516,6 +2516,22 @@ added by the ALC_EXT_DEDICATED extension. + + + + 30 + 320 + 231 + 21 + + + + Enables legacy EAX API support. + + + Enable EAX API support + + -- cgit v1.2.3