aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmppresetselect.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-04-19 23:36:48 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-04-19 23:36:48 +0800
commit6d568d07b31ba2ae39703cfd272d3003ea542018 (patch)
tree58dca1ac27ffe9dd6bb045c5a71d04644b7a2e07 /qmidiplayer-desktop/qmppresetselect.cpp
parentc7bf3e37e6eaed6895c797f72ef116b42c6f8a44 (diff)
downloadQMidiPlayer-6d568d07b31ba2ae39703cfd272d3003ea542018.tar.xz
Legacy code massacre!
Complete reconstruction of the settings infrastructure. All options are now registered using a revamped option API. Legacy configuration files are no longer compatible. Please make a backup.
Diffstat (limited to 'qmidiplayer-desktop/qmppresetselect.cpp')
-rw-r--r--qmidiplayer-desktop/qmppresetselect.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qmidiplayer-desktop/qmppresetselect.cpp b/qmidiplayer-desktop/qmppresetselect.cpp
index 8c28fe6..52b0b66 100644
--- a/qmidiplayer-desktop/qmppresetselect.cpp
+++ b/qmidiplayer-desktop/qmppresetselect.cpp
@@ -95,11 +95,11 @@ void qmpPresetSelector::on_pbOk_clicked()
int b,p;
b=ui->lwBankSelect->currentItem()->text().toInt();
p=ui->lwPresetSelect->currentItem()->text().split(' ').first().toInt();
- QString s=qmpSettingsWindow::getSettingsIntf()->value("Audio/BankSelect","CC#0").toString();
- if(s=="CC#32"){
+ std::string s=qmpMainWindow::getInstance()->getSettings()->getOptionEnumIntOptName("FluidSynth/BankSelect");
+ if(s=="XG"){
if(b==128)b=127<<7;
}
- else if(s=="CC#0")b<<=7;
+ else if(s=="GS")b<<=7;
plyr->setChannelPreset(ch,b,p);
}
qmpMainWindow::getInstance()->invokeCallback("preset.set",nullptr);