Update uimenu.cpp

pull/341/head
arsamus 3 years ago committed by GitHub
parent 27a0738a4c
commit f0f1030801
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      src/uimenu.cpp

@ -553,7 +553,7 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event)
{ {
if(bAutoBankSkip && nBankNumber > 0) if(bAutoBankSkip && nBankNumber > 0)
{ {
pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TGParameterVoiceBank, nBankNumber-1, nTG); pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TGParameterVoiceBank, --nBankNumber, nTG);
nValue=(int) CSysExFileLoader::VoicesPerBank-1; nValue=(int) CSysExFileLoader::VoicesPerBank-1;
} }
else else
@ -569,8 +569,8 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event)
{ {
if(bAutoBankSkip && nBankNumber < (int) CSysExFileLoader::MaxVoiceBankID) if(bAutoBankSkip && nBankNumber < (int) CSysExFileLoader::MaxVoiceBankID)
{ {
pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TGParameterVoiceBank, nBankNumber+1, nTG); pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TGParameterVoiceBank, ++nBankNumber, nTG);
nValue=(int) CSysExFileLoader::VoicesPerBank-1; nValue=0;
} }
else else
{ {
@ -596,13 +596,13 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event)
if(bAutoBankSkip) if(bAutoBankSkip)
{ {
string uchBankName = "" + pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetBankName (nBankNumber); string uchBankName = pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetBankName (nBankNumber);
uchBankName = uchBankName.substr(0,11); uchBankName = uchBankName.substr(0,12);
pUIMenu->m_pUI->DisplayWrite (TG.c_str (), pUIMenu->m_pUI->DisplayWrite (TG.c_str (),
uchBankName, uchBankName.c_str (),
Value.c_str (), Value.c_str (),
nValue > 0, nValue < (int) CSysExFileLoader::VoicesPerBank-1) && nBankNumber < (int) CSysExFileLoader::MaxVoiceBankID); nValue > 0 || nBankNumber > 0, nValue < (int) CSysExFileLoader::VoicesPerBank-1 || nBankNumber < (int) CSysExFileLoader::MaxVoiceBankID);
} }
else else
{ {

Loading…
Cancel
Save