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

Origin commit data
------------------
Commit: 7c1058382f
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-25 (Sat, 25 Nov 2017)

Origin message was:
------------------
- screensaver: move more repeatedly used code to screensaver's code
This commit is contained in:
vanhofen
2017-11-25 09:58:55 +01:00
parent 8cd208eab7
commit 59dd52f825
4 changed files with 11 additions and 5 deletions

View File

@@ -2796,8 +2796,7 @@ void CNeutrinoApp::RealRun()
);
if (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())
{
CInfoClock::getInstance()->block();
CScreenSaver::getInstance()->Start();