diff options
author | Chris Robinson <[email protected]> | 2014-08-07 05:16:05 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-08-07 05:16:05 -0700 |
commit | 10c01110f33c920e0145bf672f4bd58307589926 (patch) | |
tree | 392985aeef5f064528fcd6ae0aadb3a4980d5120 | |
parent | 6048d70232b95cafceeab20623d275b85c1aa35a (diff) |
Modify CPU extensions and effect options to be enabled when checked
It looks nicer and more featured for options to be checked when they're
allowed, rather than when disallowed.
-rw-r--r-- | utils/alsoft-config/mainwindow.cpp | 56 | ||||
-rw-r--r-- | utils/alsoft-config/mainwindow.ui | 112 |
2 files changed, 105 insertions, 63 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index c58000d9..1d5a3dcd 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -260,10 +260,10 @@ void MainWindow::loadConfig(const QString &fname) disabledCpuExts = disabledCpuExts[0].split(QChar(',')); std::transform(disabledCpuExts.begin(), disabledCpuExts.end(), disabledCpuExts.begin(), std::mem_fun_ref(&QString::trimmed)); - ui->disableSSECheckBox->setChecked(disabledCpuExts.contains("sse", Qt::CaseInsensitive)); - ui->disableSSE2CheckBox->setChecked(disabledCpuExts.contains("sse2", Qt::CaseInsensitive)); - ui->disableSSE41CheckBox->setChecked(disabledCpuExts.contains("sse4.1", Qt::CaseInsensitive)); - ui->disableNeonCheckBox->setChecked(disabledCpuExts.contains("neon", Qt::CaseInsensitive)); + ui->enableSSECheckBox->setChecked(!disabledCpuExts.contains("sse", Qt::CaseInsensitive)); + ui->enableSSE2CheckBox->setChecked(!disabledCpuExts.contains("sse2", Qt::CaseInsensitive)); + ui->enableSSE41CheckBox->setChecked(!disabledCpuExts.contains("sse4.1", Qt::CaseInsensitive)); + ui->enableNeonCheckBox->setChecked(!disabledCpuExts.contains("neon", Qt::CaseInsensitive)); if(settings.value("hrtf").toString() == QString()) ui->hrtfEnableButton->setChecked(true); @@ -331,16 +331,16 @@ void MainWindow::loadConfig(const QString &fname) excludefx = excludefx[0].split(QChar(',')); std::transform(excludefx.begin(), excludefx.end(), excludefx.begin(), std::mem_fun_ref(&QString::trimmed)); - ui->disableEaxReverbCheck->setChecked(excludefx.contains("eaxreverb", Qt::CaseInsensitive)); - ui->disableStdReverbCheck->setChecked(excludefx.contains("reverb", Qt::CaseInsensitive)); - ui->disableChorusCheck->setChecked(excludefx.contains("chorus", Qt::CaseInsensitive)); - ui->disableCompressorCheck->setChecked(excludefx.contains("compressor", Qt::CaseInsensitive)); - ui->disableDistortionCheck->setChecked(excludefx.contains("distortion", Qt::CaseInsensitive)); - ui->disableEchoCheck->setChecked(excludefx.contains("echo", Qt::CaseInsensitive)); - ui->disableEqualizerCheck->setChecked(excludefx.contains("equalizer", Qt::CaseInsensitive)); - ui->disableFlangerCheck->setChecked(excludefx.contains("flanger", Qt::CaseInsensitive)); - ui->disableModulatorCheck->setChecked(excludefx.contains("modulator", Qt::CaseInsensitive)); - ui->disableDedicatedCheck->setChecked(excludefx.contains("dedicated", Qt::CaseInsensitive)); + ui->enableEaxReverbCheck->setChecked(!excludefx.contains("eaxreverb", Qt::CaseInsensitive)); + ui->enableStdReverbCheck->setChecked(!excludefx.contains("reverb", Qt::CaseInsensitive)); + ui->enableChorusCheck->setChecked(!excludefx.contains("chorus", Qt::CaseInsensitive)); + ui->enableCompressorCheck->setChecked(!excludefx.contains("compressor", Qt::CaseInsensitive)); + ui->enableDistortionCheck->setChecked(!excludefx.contains("distortion", Qt::CaseInsensitive)); + ui->enableEchoCheck->setChecked(!excludefx.contains("echo", Qt::CaseInsensitive)); + ui->enableEqualizerCheck->setChecked(!excludefx.contains("equalizer", Qt::CaseInsensitive)); + ui->enableFlangerCheck->setChecked(!excludefx.contains("flanger", Qt::CaseInsensitive)); + ui->enableModulatorCheck->setChecked(!excludefx.contains("modulator", Qt::CaseInsensitive)); + ui->enableDedicatedCheck->setChecked(!excludefx.contains("dedicated", Qt::CaseInsensitive)); } void MainWindow::saveCurrentConfig() @@ -399,13 +399,13 @@ void MainWindow::saveConfig(const QString &fname) const } QStringList strlist; - if(ui->disableSSECheckBox->isChecked()) + if(!ui->enableSSECheckBox->isChecked()) strlist.append("sse"); - if(ui->disableSSE2CheckBox->isChecked()) + if(!ui->enableSSE2CheckBox->isChecked()) strlist.append("sse2"); - if(ui->disableSSE41CheckBox->isChecked()) + if(!ui->enableSSE41CheckBox->isChecked()) strlist.append("sse4.1"); - if(ui->disableNeonCheckBox->isChecked()) + if(!ui->enableNeonCheckBox->isChecked()) strlist.append("neon"); settings.setValue("disable-cpu-exts", strlist.join(QChar(','))); @@ -456,25 +456,25 @@ void MainWindow::saveConfig(const QString &fname) const settings.setValue("reverb/boost", ui->reverbBoostEdit->text()); strlist.clear(); - if(ui->disableEaxReverbCheck->isChecked()) + if(!ui->enableEaxReverbCheck->isChecked()) strlist.append("eaxreverb"); - if(ui->disableStdReverbCheck->isChecked()) + if(!ui->enableStdReverbCheck->isChecked()) strlist.append("reverb"); - if(ui->disableChorusCheck->isChecked()) + if(!ui->enableChorusCheck->isChecked()) strlist.append("chorus"); - if(ui->disableDistortionCheck->isChecked()) + if(!ui->enableDistortionCheck->isChecked()) strlist.append("distortion"); - if(ui->disableCompressorCheck->isChecked()) + if(!ui->enableCompressorCheck->isChecked()) strlist.append("compressor"); - if(ui->disableEchoCheck->isChecked()) + if(!ui->enableEchoCheck->isChecked()) strlist.append("echo"); - if(ui->disableEqualizerCheck->isChecked()) + if(!ui->enableEqualizerCheck->isChecked()) strlist.append("equalizer"); - if(ui->disableFlangerCheck->isChecked()) + if(!ui->enableFlangerCheck->isChecked()) strlist.append("flanger"); - if(ui->disableModulatorCheck->isChecked()) + if(!ui->enableModulatorCheck->isChecked()) strlist.append("modulator"); - if(ui->disableDedicatedCheck->isChecked()) + if(!ui->enableDedicatedCheck->isChecked()) strlist.append("dedicated"); settings.setValue("excludefx", strlist.join(QChar(','))); diff --git a/utils/alsoft-config/mainwindow.ui b/utils/alsoft-config/mainwindow.ui index b9e9acee..3c92abf6 100644 --- a/utils/alsoft-config/mainwindow.ui +++ b/utils/alsoft-config/mainwindow.ui @@ -778,63 +778,75 @@ value currently possible is 4.</string> </rect> </property> <property name="toolTip"> - <string>Disables use of specific CPU extensions. Certain methods may -utilize CPU extensions when detected, and this is useful for -preventing those extensions from being used.</string> + <string>Enables use of specific CPU extensions. Certain methods may +utilize CPU extensions when detected, and disabling these can +be useful for preventing those extensions from being used.</string> </property> <property name="title"> <string>CPU Extensions</string> </property> - <widget class="QCheckBox" name="disableSSECheckBox"> + <widget class="QCheckBox" name="enableSSECheckBox"> <property name="geometry"> <rect> - <x>10</x> + <x>180</x> <y>20</y> - <width>101</width> + <width>71</width> <height>31</height> </rect> </property> <property name="text"> - <string>Disable SSE</string> + <string>SSE</string> + </property> + <property name="checked"> + <bool>true</bool> </property> </widget> - <widget class="QCheckBox" name="disableSSE2CheckBox"> + <widget class="QCheckBox" name="enableSSE2CheckBox"> <property name="geometry"> <rect> - <x>200</x> - <y>20</y> - <width>111</width> + <x>180</x> + <y>50</y> + <width>71</width> <height>31</height> </rect> </property> <property name="text"> - <string>Disable SSE2</string> + <string>SSE2</string> + </property> + <property name="checked"> + <bool>true</bool> </property> </widget> - <widget class="QCheckBox" name="disableNeonCheckBox"> + <widget class="QCheckBox" name="enableNeonCheckBox"> <property name="geometry"> <rect> - <x>200</x> + <x>260</x> <y>50</y> - <width>111</width> + <width>71</width> <height>31</height> </rect> </property> <property name="text"> - <string>Disable Neon</string> + <string>Neon</string> + </property> + <property name="checked"> + <bool>true</bool> </property> </widget> - <widget class="QCheckBox" name="disableSSE41CheckBox"> + <widget class="QCheckBox" name="enableSSE41CheckBox"> <property name="geometry"> <rect> - <x>370</x> + <x>260</x> <y>20</y> - <width>121</width> + <width>71</width> <height>31</height> </rect> </property> <property name="text"> - <string>Disable SSE4.1</string> + <string>SSE4.1</string> + </property> + <property name="checked"> + <bool>true</bool> </property> </widget> </widget> @@ -1030,14 +1042,14 @@ value of 0 means no change.</string> </rect> </property> <property name="toolTip"> - <string>Disables effects, preventing apps from recognizing them. This -can help for apps that try to use effects which are too CPU -intensive for the system to handle.</string> + <string>Specifies which effects apps can recognize. Disabling effects +can help for apps that try to use ones that are too intensive +for the system to handle.</string> </property> <property name="title"> - <string>Disabled Effects</string> + <string>Enabled Effects</string> </property> - <widget class="QCheckBox" name="disableEaxReverbCheck"> + <widget class="QCheckBox" name="enableEaxReverbCheck"> <property name="geometry"> <rect> <x>70</x> @@ -1049,8 +1061,11 @@ intensive for the system to handle.</string> <property name="text"> <string>EAX Reverb</string> </property> + <property name="checked"> + <bool>true</bool> + </property> </widget> - <widget class="QCheckBox" name="disableStdReverbCheck"> + <widget class="QCheckBox" name="enableStdReverbCheck"> <property name="geometry"> <rect> <x>70</x> @@ -1062,8 +1077,11 @@ intensive for the system to handle.</string> <property name="text"> <string>Standard Reverb</string> </property> + <property name="checked"> + <bool>true</bool> + </property> </widget> - <widget class="QCheckBox" name="disableChorusCheck"> + <widget class="QCheckBox" name="enableChorusCheck"> <property name="geometry"> <rect> <x>70</x> @@ -1075,8 +1093,11 @@ intensive for the system to handle.</string> <property name="text"> <string>Chorus</string> </property> + <property name="checked"> + <bool>true</bool> + </property> </widget> - <widget class="QCheckBox" name="disableDistortionCheck"> + <widget class="QCheckBox" name="enableDistortionCheck"> <property name="geometry"> <rect> <x>70</x> @@ -1088,8 +1109,11 @@ intensive for the system to handle.</string> <property name="text"> <string>Distortion</string> </property> + <property name="checked"> + <bool>true</bool> + </property> </widget> - <widget class="QCheckBox" name="disableEchoCheck"> + <widget class="QCheckBox" name="enableEchoCheck"> <property name="geometry"> <rect> <x>320</x> @@ -1101,8 +1125,11 @@ intensive for the system to handle.</string> <property name="text"> <string>Echo</string> </property> + <property name="checked"> + <bool>true</bool> + </property> </widget> - <widget class="QCheckBox" name="disableEqualizerCheck"> + <widget class="QCheckBox" name="enableEqualizerCheck"> <property name="geometry"> <rect> <x>320</x> @@ -1114,8 +1141,11 @@ intensive for the system to handle.</string> <property name="text"> <string>Equalizer</string> </property> + <property name="checked"> + <bool>true</bool> + </property> </widget> - <widget class="QCheckBox" name="disableFlangerCheck"> + <widget class="QCheckBox" name="enableFlangerCheck"> <property name="geometry"> <rect> <x>320</x> @@ -1127,8 +1157,11 @@ intensive for the system to handle.</string> <property name="text"> <string>Flanger</string> </property> + <property name="checked"> + <bool>true</bool> + </property> </widget> - <widget class="QCheckBox" name="disableModulatorCheck"> + <widget class="QCheckBox" name="enableModulatorCheck"> <property name="geometry"> <rect> <x>320</x> @@ -1140,8 +1173,11 @@ intensive for the system to handle.</string> <property name="text"> <string>Ring Modulator</string> </property> + <property name="checked"> + <bool>true</bool> + </property> </widget> - <widget class="QCheckBox" name="disableDedicatedCheck"> + <widget class="QCheckBox" name="enableDedicatedCheck"> <property name="geometry"> <rect> <x>320</x> @@ -1151,14 +1187,17 @@ intensive for the system to handle.</string> </rect> </property> <property name="toolTip"> - <string>Disables both the Dedicated Dialog and Dedicated LFE effects + <string>Enables both the Dedicated Dialog and Dedicated LFE effects added by the ALC_EXT_DEDICATED extension.</string> </property> <property name="text"> <string>Dedicated ...</string> </property> + <property name="checked"> + <bool>true</bool> + </property> </widget> - <widget class="QCheckBox" name="disableCompressorCheck"> + <widget class="QCheckBox" name="enableCompressorCheck"> <property name="geometry"> <rect> <x>70</x> @@ -1170,6 +1209,9 @@ added by the ALC_EXT_DEDICATED extension.</string> <property name="text"> <string>Compressor</string> </property> + <property name="checked"> + <bool>true</bool> + </property> </widget> </widget> <widget class="QLabel" name="label_13"> |