From 6d568d07b31ba2ae39703cfd272d3003ea542018 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sun, 19 Apr 2020 23:36:48 +0800 Subject: 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. --- qmidiplayer-desktop/qmppresetselect.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qmidiplayer-desktop/qmppresetselect.cpp') 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); -- cgit v1.2.3