diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index 0cf4ac8b8..dca06ad99 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -38,7 +38,7 @@ #include "screensaver.h" #include #include -extern CInfoClock *InfoClock; + #include extern cVideo * videoDecoder; @@ -84,6 +84,9 @@ void CScreenSaver::Start() status_mute = CAudioMute::getInstance()->getStatus(); CAudioMute::getInstance()->enableMuteIcon(false); + if(!CInfoClock::getInstance()->isBlocked()) + CInfoClock::getInstance()->disableInfoClock(); + m_viewer->SetScaling((CPictureViewer::ScalingMode)g_settings.picviewer_scaling); m_viewer->SetVisible(g_settings.screen_StartX, g_settings.screen_EndX, g_settings.screen_StartY, g_settings.screen_EndY); @@ -125,7 +128,7 @@ void CScreenSaver::Stop() if (!OnAfterStop.empty()) OnAfterStop(); else - InfoClock->enableInfoClock(); + CInfoClock::getInstance()->enableInfoClock(); } void* CScreenSaver::ScreenSaverPrg(void* arg) @@ -281,3 +284,10 @@ void CScreenSaver::paint() clr.i_color = COL_DARK_GRAY; } } + +bool CScreenSaver::IsRun() +{ + if(thrScreenSaver) + return true; + return false; +} \ No newline at end of file diff --git a/src/gui/screensaver.h b/src/gui/screensaver.h index 23adbe940..696425fa7 100644 --- a/src/gui/screensaver.h +++ b/src/gui/screensaver.h @@ -65,7 +65,7 @@ class CScreenSaver : public sigc::trackable CScreenSaver(); ~CScreenSaver(); static CScreenSaver* getInstance(); - + bool IsRun(); void Start(); void Stop(); sigc::signal OnBeforeStart; diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index fdc97b3a7..51284dcac 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -33,7 +33,7 @@ #include #include #include - +#include "screensaver.h" CTimeOSD::CTimeOSD():CComponentsFrmClock( 1, 1, NULL, "%H:%M:%S", NULL, false, 1, NULL, CC_SHADOW_ON, COL_LIGHT_GRAY, COL_MENUCONTENT_PLUS_0,COL_MENUCONTENTDARK_PLUS_0) @@ -96,7 +96,7 @@ void CTimeOSD::initTimeString() void CTimeOSD::show(time_t time_show, bool force) { time_show /= 1000; - if (!force && (m_mode == MODE_HIDE || m_time_show == time_show)) + if (!force && (m_mode == MODE_HIDE || m_time_show == time_show) || CScreenSaver::getInstance()->IsRun()) return; m_time_show = time_show;