Merge branch 'master' into pu/fb-setmode

This commit is contained in:
2017-05-27 17:29:28 +02:00
6 changed files with 21 additions and 14 deletions

View File

@@ -66,15 +66,16 @@ CAdZapMenu::CAdZapMenu()
sem_init(&sem, 0, 0);
channelId = -1;
armed = false;
monitor = false;
alerted = false;
pthread_t thr;
if (pthread_create(&thr, 0, CAdZapMenu::Run, this))
fprintf(stderr, "ERROR: pthread_create(CAdZapMenu::CAdZapMenu)\n");
else
pthread_detach(thr);
channelId = -1;
armed = false;
monitor = false;
alerted = false;
}
static bool sortByDateTime(const CChannelEvent & a, const CChannelEvent & b)

View File

@@ -374,15 +374,16 @@ bool CCDraw::clearFbGradientData()
for(size_t i =0; i< v_fbdata.size() ;i++) {
if (v_fbdata[i].gradient_data){
if (v_fbdata[i].gradient_data->gradientBuf){
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], clean up gradientBuf \t %p...\033[0m\n", __func__, __LINE__, v_fbdata[i].gradient_data->gradientBuf);
free(v_fbdata[i].gradient_data->gradientBuf);
v_fbdata[i].gradient_data->gradientBuf = NULL;
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], clean up gradientBuf...\033[0m\n", __func__, __LINE__);
}
if (v_fbdata[i].gradient_data->boxBuf){
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], clean up boxBuf \t %p...\033[0m\n", __func__, __LINE__, v_fbdata[i].gradient_data->boxBuf);
cs_free_uncached(v_fbdata[i].gradient_data->boxBuf);
v_fbdata[i].gradient_data->boxBuf = NULL;
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], clean up boxBuf...\033[0m\n", __func__, __LINE__);
}
dprintf(DEBUG_INFO, "\033[33m[CCDraw]\t[%s - %d], clean up gradient data \t %p...\033[0m\n", __func__, __LINE__, v_fbdata[i].gradient_data);
delete v_fbdata[i].gradient_data;
v_fbdata[i].gradient_data = NULL;
ret = true;

View File

@@ -325,12 +325,14 @@ bool CComponentsFrmClock::startClock()
if (cl_timer == NULL){
cl_timer = new CComponentsTimer(0);
cl_timer->setThreadName("frmClock");
if (cl_timer->OnTimer.empty()){
dprintf(DEBUG_INFO,"\033[33m[CComponentsFrmClock]\t[%s] init slot...\033[0m\n", __func__);
cl_timer->OnTimer.connect(cl_sl_show);
force_paint_bg = true;
}
}
if (cl_timer->OnTimer.empty()){
dprintf(DEBUG_INFO,"\033[33m[CComponentsFrmClock]\t[%s] init slot...\033[0m\n", __func__);
cl_timer->OnTimer.connect(cl_sl_show);
force_paint_bg = true;
}
cl_timer->setTimerInterval(cl_interval);
if (cl_timer->startTimer())
@@ -390,7 +392,7 @@ void CComponentsFrmClock::paint(bool do_save_bg)
void CComponentsFrmClock::setClockFont(Font *font, const int& style)
{
if (cl_font != font || (cl_font != font)){
if (cl_font != font || cl_font_style != style){
if (cl_font != font)
cl_font = font;
if (style != -1)

View File

@@ -232,8 +232,10 @@ void CComponentsHeader::initIcon()
//init cch_icon_obj only if an icon available
if (cch_icon_name.empty()) {
cch_icon_w = 0;
if (cch_icon_obj)
if (cch_icon_obj){
removeCCItem(cch_icon_obj);
cch_icon_obj = NULL;
}
return;
}

View File

@@ -143,6 +143,7 @@ bool CComponentsTimer::startTimer()
bool CComponentsTimer::stopTimer()
{
tm_enable = false;
OnTimer.clear();
stopThread();
if(tm_thread == 0)
return true;

View File

@@ -164,7 +164,7 @@ void* CScreenSaver::ScreenSaverPrg(void* arg)
if (g_settings.screensaver_timeout)
{
while(1)
while(PScreenSaver)
{
PScreenSaver->paint();
sleep(g_settings.screensaver_timeout);