src/gui/screensaver.cpp: simplify painting images

Images will paint on full screen without blank frame in movie player mode.

TODO: Only with scale at the moment, but not sure if this must be changed.


Origin commit data
------------------
Commit: c77ce410e8
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-05-18 (Fri, 18 May 2018)
This commit is contained in:
2018-05-18 21:34:13 +02:00
committed by vanhofen
parent 6c108819ed
commit 564772afb7
2 changed files with 4 additions and 14 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,15 +107,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)
@@ -271,7 +262,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++;