- neutrino: add more RC_playpause handling

Conflicts:
	src/gui/movieplayer.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-12-19 10:58:44 +01:00
committed by Thilo Graf
parent c9e4712011
commit 3d5aa5977a
9 changed files with 63 additions and 30 deletions

View File

@@ -582,29 +582,40 @@ int CPictureViewerGui::show()
// FIXME: do not accept volume-keys while decoding
}
// control keys for audioplayer
else if (audioplayer && msg==CRCInput::RC_pause)
else if (audioplayer)
{
m_currentTitle = m_audioPlayer->getAudioPlayerM_current();
m_audioPlayer->pause();
}
else if (audioplayer && msg==CRCInput::RC_stop)
{
m_currentTitle = m_audioPlayer->getAudioPlayerM_current();
m_audioPlayer->stop();
}
else if (audioplayer && msg==CRCInput::RC_play)
{
m_currentTitle = m_audioPlayer->getAudioPlayerM_current();
if (m_currentTitle > -1)
m_audioPlayer->play((unsigned int)m_currentTitle);
}
else if (audioplayer && msg==CRCInput::RC_forward)
{
m_audioPlayer->playNext();
}
else if (audioplayer && msg==CRCInput::RC_rewind)
{
m_audioPlayer->playPrev();
if (msg == CRCInput::RC_playpause)
{
// manipulate msg
if (m_audioPlayer->getState() == CAudioPlayerGui::PAUSE)
msg = CRCInput::RC_play;
else
msg = CRCInput::RC_pause;
}
if (msg == CRCInput::RC_play)
{
if (m_currentTitle > -1)
m_audioPlayer->play((unsigned int)m_currentTitle);
}
else if (msg == CRCInput::RC_pause)
{
m_audioPlayer->pause();
}
else if (msg == CRCInput::RC_stop)
{
m_audioPlayer->stop();
}
else if (msg == CRCInput::RC_forward || msg == CRCInput::RC_nextsong)
{
m_audioPlayer->playNext();
}
else if (msg == CRCInput::RC_rewind || msg == CRCInput::RC_previoussong)
{
m_audioPlayer->playPrev();
}
}
else if (msg == NeutrinoMessages::CHANGEMODE)
{