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); sem_init(&sem, 0, 0);
channelId = -1;
armed = false;
monitor = false;
alerted = false;
pthread_t thr; pthread_t thr;
if (pthread_create(&thr, 0, CAdZapMenu::Run, this)) if (pthread_create(&thr, 0, CAdZapMenu::Run, this))
fprintf(stderr, "ERROR: pthread_create(CAdZapMenu::CAdZapMenu)\n"); fprintf(stderr, "ERROR: pthread_create(CAdZapMenu::CAdZapMenu)\n");
else else
pthread_detach(thr); pthread_detach(thr);
channelId = -1;
armed = false;
monitor = false;
alerted = false;
} }
static bool sortByDateTime(const CChannelEvent & a, const CChannelEvent & b) 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++) { for(size_t i =0; i< v_fbdata.size() ;i++) {
if (v_fbdata[i].gradient_data){ if (v_fbdata[i].gradient_data){
if (v_fbdata[i].gradient_data->gradientBuf){ 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); free(v_fbdata[i].gradient_data->gradientBuf);
v_fbdata[i].gradient_data->gradientBuf = NULL; 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){ 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); cs_free_uncached(v_fbdata[i].gradient_data->boxBuf);
v_fbdata[i].gradient_data->boxBuf = NULL; 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; delete v_fbdata[i].gradient_data;
v_fbdata[i].gradient_data = NULL; v_fbdata[i].gradient_data = NULL;
ret = true; ret = true;

View File

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

View File

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

View File

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

View File

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