add listModeKey() function to simplify these calls

Origin commit data
------------------
Commit: 59b7e3ae36
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-09-09 (Fri, 09 Sep 2016)

Origin message was:
------------------
- add listModeKey() function to simplify these calls
This commit is contained in:
vanhofen
2016-09-09 10:42:46 +02:00
parent 36ab3c14df
commit 73463ef279
29 changed files with 80 additions and 61 deletions

View File

@@ -3013,6 +3013,17 @@ void CNeutrinoApp::lockPlayBack(bool blank)
videoDecoder->setBlank(true);
}
bool CNeutrinoApp::listModeKey(const neutrino_msg_t msg)
{
if (
msg == CRCInput::RC_sat
|| msg == CRCInput::RC_favorites
|| msg == CRCInput::RC_www
)
return true;
return false;
}
int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
{
int res = 0;
@@ -3108,7 +3119,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
}
/* ================================== KEYS ================================================ */
if( msg == CRCInput::RC_ok || (!g_InfoViewer->getSwitchMode() && (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www))) {
if( msg == CRCInput::RC_ok || (!g_InfoViewer->getSwitchMode() && CNeutrinoApp::getInstance()->listModeKey(msg))) {
if( (mode == mode_tv) || (mode == mode_radio) || (mode == mode_ts) || (mode == mode_webtv)) {
showChannelList(msg);
return messages_return::handled;