- screensaver: disable pip while screensaver

This commit is contained in:
defans
2016-01-16 12:29:22 +01:00
committed by svenhoefer
parent b00e78a165
commit 87db52784f
2 changed files with 12 additions and 2 deletions

View File

@@ -38,7 +38,7 @@
#include "screensaver.h" #include "screensaver.h"
#include <system/debug.h> #include <system/debug.h>
#include <gui/infoclock.h> #include <gui/infoclock.h>
#include <zapit/zapit.h>
#include <video.h> #include <video.h>
extern cVideo * videoDecoder; extern cVideo * videoDecoder;
@@ -54,6 +54,7 @@ CScreenSaver::CScreenSaver()
status_mute = CAudioMute::getInstance()->getStatus(); status_mute = CAudioMute::getInstance()->getStatus();
scr_clock = NULL; scr_clock = NULL;
clr.i_color = COL_DARK_GRAY; clr.i_color = COL_DARK_GRAY;
pip_channel_id = 0;
} }
CScreenSaver::~CScreenSaver() CScreenSaver::~CScreenSaver()
@@ -87,6 +88,10 @@ void CScreenSaver::Start()
if(!CInfoClock::getInstance()->isBlocked()) if(!CInfoClock::getInstance()->isBlocked())
CInfoClock::getInstance()->disableInfoClock(); CInfoClock::getInstance()->disableInfoClock();
pip_channel_id = CZapit::getInstance()->GetPipChannelID();
if (pip_channel_id)
g_Zapit->stopPip();
m_viewer->SetScaling((CPictureViewer::ScalingMode)g_settings.picviewer_scaling); 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); m_viewer->SetVisible(g_settings.screen_StartX, g_settings.screen_EndX, g_settings.screen_StartY, g_settings.screen_EndY);
@@ -122,6 +127,11 @@ void CScreenSaver::Stop()
scr_clock = NULL; scr_clock = NULL;
} }
if(pip_channel_id) {
CNeutrinoApp::getInstance()->StartPip(pip_channel_id);
pip_channel_id = 0;
}
m_frameBuffer->paintBackground(); //clear entire screen m_frameBuffer->paintBackground(); //clear entire screen
CAudioMute::getInstance()->enableMuteIcon(status_mute); CAudioMute::getInstance()->enableMuteIcon(status_mute);

View File

@@ -40,7 +40,7 @@ class CScreenSaver : public sigc::trackable
static void* ScreenSaverPrg(void *arg); static void* ScreenSaverPrg(void *arg);
vector<string> v_bg_files; vector<string> v_bg_files;
unsigned int index; unsigned int index;
t_channel_id pip_channel_id;
bool status_mute; bool status_mute;
bool ReadDir(); bool ReadDir();