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.
This commit is contained in:
2018-05-18 16:53:51 +02:00
parent becf676dc6
commit b8c28d069d
2 changed files with 4 additions and 14 deletions

View File

@@ -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++;