void* CVFD::TimeThread(void *) { bool RecVisible = true; while(1) { sleep(1); struct stat buf; if (stat("/tmp/vfd.locked", &buf) == -1) { CVFD::getInstance()->showTime(); CVFD::getInstance()->count_down(); } else CVFD::getInstance()->wake_up(); /* hack, just if we missed the blit() somewhere * this will update the framebuffer once per second */ if (getenv("AUTOBLIT") != NULL) { CFrameBuffer *fb = CFrameBuffer::getInstance(); /* plugin start locks the framebuffer... */ if (!fb->Locked()) fb->blit(); } if (g_settings.lcd_vfd_recicon == 1) { if (RecIconID >=0 && CNeutrinoApp::getInstance()->recordingstatus && !CRecordManager::getInstance()->TimeshiftOnly()) { RecVisible = !RecVisible; SetIcon(RecIconID, RecVisible); } } else { if (RecIconID >=0 && CNeutrinoApp::getInstance()->recordingstatus && !CRecordManager::getInstance()->TimeshiftOnly() && CVFD::getInstance()->mode != MODE_STANDBY) { RecVisible = !RecVisible; SetIcon(RecIconID, RecVisible); } } } return NULL; }
void* CLCD::TimeThread(void *) { while (CLCD::getInstance()->thread_running) { sleep(1); CLCD::getInstance()->showTime(); /* hack, just if we missed the blit() somewhere * this will update the framebuffer once per second */ if (getenv("SPARK_NOBLIT") == NULL) { CFrameBuffer *fb = CFrameBuffer::getInstance(); /* plugin start locks the framebuffer... */ if (!fb->Locked()) fb->blit(); } } return NULL; }
void* CLCD::TimeThread(void *) { while (CLCD::getInstance()->thread_running) { sleep(1); if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT) { struct stat buf; if (stat("/tmp/vfd.locked", &buf) == -1) { CLCD::getInstance()->showTime(); CLCD::getInstance()->count_down(); } else CLCD::getInstance()->wake_up(); } else CLCD::getInstance()->showTime(); /* hack, just if we missed the blit() somewhere * this will update the framebuffer once per second */ if (getenv("SPARK_NOBLIT") == NULL) { CFrameBuffer *fb = CFrameBuffer::getInstance(); /* plugin start locks the framebuffer... */ if (!fb->Locked()) fb->blit(); } } return NULL; }