From f0f10308016071a650338038bb45a0fdd09c7a8d Mon Sep 17 00:00:00 2001 From: arsamus Date: Sat, 27 Aug 2022 01:29:56 -0300 Subject: [PATCH] Update uimenu.cpp --- src/uimenu.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/uimenu.cpp b/src/uimenu.cpp index a0018e2..68818bb 100644 --- a/src/uimenu.cpp +++ b/src/uimenu.cpp @@ -553,7 +553,7 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event) { 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; } else @@ -569,8 +569,8 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event) { if(bAutoBankSkip && nBankNumber < (int) CSysExFileLoader::MaxVoiceBankID) { - pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TGParameterVoiceBank, nBankNumber+1, nTG); - nValue=(int) CSysExFileLoader::VoicesPerBank-1; + pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TGParameterVoiceBank, ++nBankNumber, nTG); + nValue=0; } else { @@ -596,13 +596,13 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event) if(bAutoBankSkip) { - string uchBankName = "" + pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetBankName (nBankNumber); - uchBankName = uchBankName.substr(0,11); + string uchBankName = pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetBankName (nBankNumber); + uchBankName = uchBankName.substr(0,12); pUIMenu->m_pUI->DisplayWrite (TG.c_str (), - uchBankName, + uchBankName.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 {