- neutrino: unify modes handling; ...

remove double enum from CNeutrinoApp and move mostly used enum from NeutrinoMessages to new NeutrinoModes

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-11-20 15:19:06 +01:00
committed by Thilo Graf
parent 1f86b6aa62
commit 0fc3e793a4
28 changed files with 233 additions and 247 deletions

View File

@@ -327,7 +327,7 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey)
// tell neutrino we're in audio mode
m_LastMode = CNeutrinoApp::getInstance()->getMode();
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE , NeutrinoMessages::mode_audio);
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE , NeutrinoModes::mode_audio);
puts("[audioplayer.cpp] executing " AUDIOPLAYER_START_SCRIPT ".");
if (my_system(AUDIOPLAYER_START_SCRIPT) != 0)
@@ -383,7 +383,7 @@ int CAudioPlayerGui::show()
updateTimes();
// stop if mode was changed in another thread
if (CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_audio)
if (CNeutrinoApp::getInstance()->getMode() != NeutrinoModes::mode_audio)
loop = false;
if (
@@ -865,7 +865,7 @@ int CAudioPlayerGui::show()
#endif
else if (msg == NeutrinoMessages::CHANGEMODE)
{
if ((data & NeutrinoMessages::mode_mask) != NeutrinoMessages::mode_audio)
if ((data & NeutrinoModes::mode_mask) != NeutrinoModes::mode_audio)
{
loop = false;
m_LastMode=data;