- screensaver: move more repeatedly used code to screensaver's code

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-11-25 09:58:55 +01:00
committed by Thilo Graf
parent c963587a0f
commit 81b82668ac
4 changed files with 11 additions and 5 deletions

View File

@@ -1671,8 +1671,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
if (playstate == CMoviePlayerGui::PAUSE && (msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER))
{
time_t delay = time(NULL) - CScreenSaver::getInstance()->getIdleTime();
if (g_settings.screensaver_delay && delay > g_settings.screensaver_delay*60 && !CScreenSaver::getInstance()->isActive())
if (CScreenSaver::getInstance()->canStart() && !CScreenSaver::getInstance()->isActive())
{
videoDecoder->setBlank(true);
CScreenSaver::getInstance()->Start();