If running on a RPI 1 or single core Pi then default to the TG1 menu as the home menu. (#481)

pull/488/head
Kevin 2 years ago committed by GitHub
parent 582c740741
commit 00e2f101bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 34
      src/uimenu.cpp

@ -338,6 +338,23 @@ CUIMenu::CUIMenu (CUserInterface *pUI, CMiniDexed *pMiniDexed)
m_nCurrentParameter (0), m_nCurrentParameter (0),
m_nCurrentMenuDepth (0) m_nCurrentMenuDepth (0)
{ {
#ifndef ARM_ALLOW_MULTI_CORE
// If there is just one core, then there is only a single
// tone generator so start on the TG1 menu...
m_pParentMenu = s_MainMenu;
m_pCurrentMenu = s_TGMenu;
m_nCurrentMenuItem = 0;
m_nCurrentSelection = 0;
m_nCurrentParameter = 0;
m_nCurrentMenuDepth = 1;
// Place the "root" menu at the top of the stack
m_MenuStackParent[0] = s_MenuRoot;
m_MenuStackMenu[0] = s_MainMenu;
m_nMenuStackItem[0] = 0;
m_nMenuStackSelection[0] = 0;
m_nMenuStackParameter[0] = 0;
#endif
} }
void CUIMenu::EventHandler (TMenuEvent Event) void CUIMenu::EventHandler (TMenuEvent Event)
@ -360,13 +377,28 @@ void CUIMenu::EventHandler (TMenuEvent Event)
break; break;
case MenuEventHome: case MenuEventHome:
#ifdef ARM_ALLOW_MULTI_CORE
m_pParentMenu = s_MenuRoot; m_pParentMenu = s_MenuRoot;
m_pCurrentMenu = s_MainMenu; m_pCurrentMenu = s_MainMenu;
m_nCurrentMenuItem = 0; m_nCurrentMenuItem = 0;
m_nCurrentSelection = 0; m_nCurrentSelection = 0;
m_nCurrentParameter = 0; m_nCurrentParameter = 0;
m_nCurrentMenuDepth = 0; m_nCurrentMenuDepth = 0;
#else
// "Home" is the TG0 menu if only one TG active
m_pParentMenu = s_MainMenu;
m_pCurrentMenu = s_TGMenu;
m_nCurrentMenuItem = 0;
m_nCurrentSelection = 0;
m_nCurrentParameter = 0;
m_nCurrentMenuDepth = 1;
// Place the "root" menu at the top of the stack
m_MenuStackParent[0] = s_MenuRoot;
m_MenuStackMenu[0] = s_MainMenu;
m_nMenuStackItem[0] = 0;
m_nMenuStackSelection[0] = 0;
m_nMenuStackParameter[0] = 0;
#endif
EventHandler (MenuEventUpdate); EventHandler (MenuEventUpdate);
break; break;

Loading…
Cancel
Save