Revert "src/gui/screensaver.cpp: simplify painting images"

This reverts commit b8c28d069da9d5bc8472149e318399fe49602ebd
because screensaver isn't usable with own photos anymore.


Origin commit data
------------------
Commit: 94a0ad51a4
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-05-23 (Wed, 23 May 2018)
This commit is contained in:
vanhofen
2018-05-23 23:51:07 +02:00
parent 22fdff2baf
commit 2475e89721
2 changed files with 14 additions and 4 deletions

View File

@@ -56,7 +56,7 @@ CScreenSaver::CScreenSaver()
{
thrScreenSaver = 0;
m_frameBuffer = CFrameBuffer::getInstance();
m_viewer = new CPictureViewer();
index = 0;
status_mute = CAudioMute::getInstance()->getStatus();
status_icons = CInfoIcons::getInstance()->getStatus(); //NI
@@ -72,7 +72,7 @@ CScreenSaver::~CScreenSaver()
pthread_cancel(thrScreenSaver);
thrScreenSaver = 0;
delete m_viewer;
if (scr_clock)
delete scr_clock;
}
@@ -107,6 +107,15 @@ 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)
@@ -261,7 +270,7 @@ void CScreenSaver::paint()
}
dprintf(DEBUG_INFO, "[CScreenSaver] %s - %d : %s\n", __func__, __LINE__, v_bg_files.at(index).c_str());
paintImage(v_bg_files.at(index), 0, 0, m_frameBuffer->getScreenWidth(true), m_frameBuffer->getScreenHeight(true));
m_viewer->ShowImage(v_bg_files.at(index).c_str(), false /*unscaled*/);
if (!g_settings.screensaver_random)
index++;

View File

@@ -30,11 +30,12 @@
#include <gui/components/cc.h>
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);