X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5..54bd4123728628a6f77bad2584b70d1353a91666:/lib/gdi/lcd.cpp diff --git a/lib/gdi/lcd.cpp b/lib/gdi/lcd.cpp index 844ad08f..4de4df05 100644 --- a/lib/gdi/lcd.cpp +++ b/lib/gdi/lcd.cpp @@ -1,3 +1,4 @@ +#if 0 #ifndef DISABLE_LCD #include @@ -9,11 +10,11 @@ #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include eDBoxLCD *eDBoxLCD::instance; @@ -40,16 +41,16 @@ int eLCD::lock() void eLCD::unlock() { - read( lcdfd, NULL, 0); - if ( errno == 9 ) - { - eDebug("reopen lcd"); - lcdfd=open("/dev/dbox/lcd0", O_RDWR); // reopen device - } - else - eDebug("do not reopen lcd.. errno = %d", errno); + read( lcdfd, NULL, 0); + if ( errno == 9 ) + { + eDebug("reopen lcd"); + lcdfd=open("/dev/dbox/lcd0", O_RDWR); // reopen device + } + else + eDebug("do not reopen lcd.. errno = %d", errno); - locked=0; + locked=0; } /* void eLCD::line(ePoint start, ePoint dst, int color) @@ -164,7 +165,10 @@ int eDBoxLCD::switchLCD(int state) eDBoxLCD::~eDBoxLCD() { if (lcdfd>0) + { close(lcdfd); + lcdfd=0; + } } eDBoxLCD *eDBoxLCD::getInstance() @@ -174,25 +178,22 @@ eDBoxLCD *eDBoxLCD::getInstance() void eDBoxLCD::update() { - if (!locked) + unsigned char raw[120*8]; + int x, y, yy; + for (y=0; y<8; y++) { - unsigned char raw[120*8]; - int x, y, yy; - for (y=0; y<8; y++) + for (x=0; x<120; x++) { - for (x=0; x<120; x++) + int pix=0; + for (yy=0; yy<8; yy++) { - int pix=0; - for (yy=0; yy<8; yy++) - { - pix|=(_buffer[(y*8+yy)*128+x]>=108)<=108)<0) - write(lcdfd, raw, 120*8); } + if (lcdfd>0) + write(lcdfd, raw, 120*8); } class eDBoxLCDHardware @@ -208,3 +209,5 @@ public: eAutoInitP0 init_eDBoxLCDHardware(eAutoInitNumbers::lowlevel, "d-Box LCD Hardware"); #endif //DISABLE_LCD + +#endif