mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
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:
@@ -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++;
|
||||
|
@@ -30,12 +30,11 @@
|
||||
#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);
|
||||
|
Reference in New Issue
Block a user