diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index 8663d6ce1..c583182e4 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -53,7 +53,7 @@ CScreenSaver::CScreenSaver() { thrScreenSaver = 0; m_frameBuffer = CFrameBuffer::getInstance(); - m_viewer = new CPictureViewer(); + index = 0; status_mute = CAudioMute::getInstance()->getStatus(); scr_clock = NULL; @@ -68,7 +68,7 @@ CScreenSaver::~CScreenSaver() pthread_cancel(thrScreenSaver); thrScreenSaver = 0; - delete m_viewer; + if (scr_clock) delete scr_clock; } @@ -99,15 +99,6 @@ void CScreenSaver::Start() g_Zapit->stopPip(); #endif - 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); - - if (g_settings.video_Format == 3) - m_viewer->SetAspectRatio(float(16.0/9)); - else - m_viewer->SetAspectRatio(float(4.0/3)); - - m_viewer->Cleanup(); m_frameBuffer->stopFrame(); if(!thrScreenSaver) @@ -262,7 +253,7 @@ void CScreenSaver::paint() } dprintf(DEBUG_INFO, "[CScreenSaver] %s - %d : %s\n", __func__, __LINE__, v_bg_files.at(index).c_str()); - m_viewer->ShowImage(v_bg_files.at(index).c_str(), false /*unscaled*/); + paintImage(v_bg_files.at(index), 0, 0, m_frameBuffer->getScreenWidth(true), m_frameBuffer->getScreenHeight(true)); if (!g_settings.screensaver_random) index++; diff --git a/src/gui/screensaver.h b/src/gui/screensaver.h index f8d51b9b1..f5273f241 100644 --- a/src/gui/screensaver.h +++ b/src/gui/screensaver.h @@ -30,12 +30,11 @@ #include class CFrameBuffer; -class CPictureViewer; + class CScreenSaver : public sigc::trackable { private: CFrameBuffer *m_frameBuffer; - CPictureViewer *m_viewer; CComponentsFrmClock *scr_clock; pthread_t thrScreenSaver; static void* ScreenSaverPrg(void *arg);