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. 3
      src/minidexed.cpp
  2. 1
      src/performanceconfig.cpp
  3. 6
      src/uimenu.cpp

@ -432,8 +432,6 @@ 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 // Only change if we have the bank loaded
@ -442,7 +440,6 @@ void CMiniDexed::BankSelectPerformance (unsigned nBank)
m_UI.ParameterChanged (); m_UI.ParameterChanged ();
} }
}
} }
void CMiniDexed::BankSelectMSB (unsigned nBankMSB, unsigned nTG) void CMiniDexed::BankSelectMSB (unsigned nBankMSB, unsigned nTG)

@ -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