Ensure bank selection works when PCCH is not enabled, and that UI remains consistent when changing banks.

pull/581/head
Kevin 10 months ago
parent 7d18461d09
commit aeac944ff0
  1. 13
      src/minidexed.cpp
  2. 1
      src/performanceconfig.cpp
  3. 6
      src/uimenu.cpp

@ -432,16 +432,13 @@ void CMiniDexed::BankSelectPerformance (unsigned nBank)
{ {
nBank=constrain((int)nBank,0,16383); nBank=constrain((int)nBank,0,16383);
if (m_nParameter[ParameterPerformanceSelectChannel] != CMIDIDevice::Disabled) if (GetPerformanceConfig ()->IsValidPerformanceBank(nBank))
{ {
if (GetPerformanceConfig ()->IsValidPerformanceBank(nBank)) // Only change if we have the bank loaded
{ m_nVoiceBankIDPerformance = nBank;
// Only change if we have the bank loaded SetNewPerformanceBank (nBank);
m_nVoiceBankIDPerformance = nBank;
SetNewPerformanceBank (nBank);
m_UI.ParameterChanged (); m_UI.ParameterChanged ();
}
} }
} }

@ -1,4 +1,3 @@
// //
// performanceconfig.cpp // performanceconfig.cpp
// //

@ -1390,6 +1390,12 @@ void CUIMenu::PerformanceMenu (CUIMenu *pUIMenu, TMenuEvent Event)
unsigned nLastPerformance = pUIMenu->m_pMiniDexed->GetLastPerformance(); unsigned nLastPerformance = pUIMenu->m_pMiniDexed->GetLastPerformance();
unsigned nValue = pUIMenu->m_nSelectedPerformanceID; unsigned nValue = pUIMenu->m_nSelectedPerformanceID;
unsigned nStart = nValue; unsigned nStart = nValue;
if (pUIMenu->m_pMiniDexed->IsValidPerformance(nValue) != true)
{
// A bank change has left the selected performance out of sync
nValue = pUIMenu->m_pMiniDexed->GetActualPerformanceID();
pUIMenu->m_nSelectedPerformanceID = nValue;
}
std::string Value; std::string Value;
if (Event == MenuEventUpdate) if (Event == MenuEventUpdate)

Loading…
Cancel
Save