Skip to content

Commit 624367b

Browse files
committed
Add option to configure default screen
Add DefaultScreen option to the minidexed.ini 0=Default 1=Performance Load Open the Performance>Load menu if Performance Load is set
1 parent 1fa9e56 commit 624367b

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

src/config.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ void CConfig::Load (void)
220220
}
221221

222222
m_nMasterVolume = m_Properties.GetNumber ("MasterVolume", 64);
223+
224+
m_nDefaultScreen = m_Properties.GetNumber ("DefaultScreen", 0);
223225
}
224226

225227
unsigned CConfig::GetToneGenerators (void) const

src/config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ class CConfig // Configuration for MiniDexed
242242

243243
unsigned GetMasterVolume() const { return m_nMasterVolume; }
244244

245+
unsigned GetDefaultScreen() const { return m_nDefaultScreen; }
246+
245247
// Network
246248
bool GetNetworkEnabled (void) const;
247249
bool GetNetworkDHCP (void) const;
@@ -371,6 +373,8 @@ class CConfig // Configuration for MiniDexed
371373
unsigned m_bPerformanceSelectChannel;
372374

373375
unsigned m_nMasterVolume; // Master volume 0-127
376+
377+
unsigned m_nDefaultScreen; // 0 Default, 1 Performance
374378

375379
// Network
376380
bool m_bNetworkEnabled;

src/minidexed.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ bool CMiniDexed::Initialize (void)
367367

368368
m_pSoundDevice->Start ();
369369

370+
m_UI.LoadDefaultScreen ();
371+
370372
#ifdef ARM_ALLOW_MULTI_CORE
371373
// start secondary cores
372374
if (!CMultiCoreSupport::Initialize ())

src/minidexed.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ QuadDAC8Chan=0
1616
# Master Volume (0-127)
1717
MasterVolume=64
1818

19+
# Default Screen (0=Default, 1=Performance Load)
20+
DefaultScreen=0
21+
1922
# MIDI
2023
MIDIBaudRate=31250
2124
#MIDIThru=umidi1,ttyS1

src/userinterface.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,17 @@ bool CUserInterface::Initialize (void)
199199
return true;
200200
}
201201

202+
void CUserInterface::LoadDefaultScreen ()
203+
{
204+
// performance load
205+
if (m_pConfig->GetDefaultScreen() == 1)
206+
{
207+
m_Menu.EventHandler (CUIMenu::MenuEventStepDown);
208+
m_Menu.EventHandler (CUIMenu::MenuEventSelect);
209+
m_Menu.EventHandler (CUIMenu::MenuEventSelect);
210+
}
211+
}
212+
202213
void CUserInterface::Process (void)
203214
{
204215
if (m_pLCDBuffered)

src/userinterface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class CUserInterface
4242

4343
bool Initialize (void);
4444

45+
void LoadDefaultScreen ();
46+
4547
void Process (void);
4648

4749
void ParameterChanged (void);

0 commit comments

Comments
 (0)