diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index f6a46dc3d..1e51b789f 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -318,3 +318,20 @@ bool CScreenSaver::isActive() return true; return false; } + +bool CScreenSaver::ignoredMsg(neutrino_msg_t msg) +{ + /* screensaver will ignore these msgs */ + if ( + msg == NeutrinoMessages::EVT_CURRENTEPG + || msg == NeutrinoMessages::EVT_NEXTEPG + || msg == NeutrinoMessages::EVT_CURRENTNEXT_EPG + || msg == NeutrinoMessages::EVT_TIMESET + || msg == NeutrinoMessages::EVT_PROGRAMLOCKSTATUS + || msg == NeutrinoMessages::EVT_ZAP_GOT_SUBSERVICES + || msg == NeutrinoMessages::EVT_ZAP_GOTAPIDS + || msg == NeutrinoMessages::EVT_ZAP_GOTPIDS + ) + return true; + return false; +} diff --git a/src/gui/screensaver.h b/src/gui/screensaver.h index f5273f241..e9a09455e 100644 --- a/src/gui/screensaver.h +++ b/src/gui/screensaver.h @@ -71,6 +71,7 @@ class CScreenSaver : public sigc::trackable bool isActive(); void Start(); void Stop(); + bool ignoredMsg(neutrino_msg_t msg); sigc::signal OnBeforeStart; sigc::signal OnAfterStop; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 26871b625..d79f45ced 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2679,17 +2679,6 @@ void CNeutrinoApp::RealRun() if (mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_webradio) #endif { - bool ignored_msg = ( - /* radio screensaver will ignore this msgs */ - msg == NeutrinoMessages::EVT_CURRENTEPG - || msg == NeutrinoMessages::EVT_NEXTEPG - || msg == NeutrinoMessages::EVT_CURRENTNEXT_EPG - || msg == NeutrinoMessages::EVT_TIMESET - || msg == NeutrinoMessages::EVT_PROGRAMLOCKSTATUS - || msg == NeutrinoMessages::EVT_ZAP_GOT_SUBSERVICES - || msg == NeutrinoMessages::EVT_ZAP_GOTAPIDS - || msg == NeutrinoMessages::EVT_ZAP_GOTPIDS - ); if (msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER) { if (CScreenSaver::getInstance()->canStart() && !CScreenSaver::getInstance()->isActive()) @@ -2698,7 +2687,7 @@ void CNeutrinoApp::RealRun() CScreenSaver::getInstance()->Start(); } } - else if (!ignored_msg) + else if (!CScreenSaver::getInstance()->ignoredMsg(msg)) { if (CScreenSaver::getInstance()->isActive()) {