fix non working fix
[enigma2.git] / lib / gdi / glcddc.cpp
index 1a5e03fa0671d95e1fd0cf9b9327eadb70153bf2..8612c70bb452b8b69baab55651bd4e27b280eab0 100644 (file)
@@ -1,11 +1,13 @@
-#ifndef DISABLE_LCD
-
 #include <lib/gdi/glcddc.h>
+#include <lib/gdi/lcd.h>
+#include <lib/base/init.h>
+#include <lib/base/init_num.h>
 
 gLCDDC *gLCDDC::instance;
 
-gLCDDC::gLCDDC(eLCD *lcd): lcd(lcd)
+gLCDDC::gLCDDC()
 {
+       lcd = new eDBoxLCD();
        instance=this;
        
        update=1;
@@ -24,6 +26,7 @@ gLCDDC::gLCDDC(eLCD *lcd): lcd(lcd)
 
 gLCDDC::~gLCDDC()
 {
+       delete lcd;
        instance=0;
 }
 
@@ -31,9 +34,8 @@ void gLCDDC::exec(gOpcode *o)
 {
        switch (o->opcode)
        {
-//     case gOpcode::flush:
-       case gOpcode::end:
-               if (update)
+       case gOpcode::flush:
+//             if (update)
                        lcd->update();
        default:
                gDC::exec(o);
@@ -41,14 +43,9 @@ void gLCDDC::exec(gOpcode *o)
        }
 }
 
-gLCDDC *gLCDDC::getInstance()
-{
-       return instance;
-}
-
 void gLCDDC::setUpdate(int u)
 {
        update=u;
 }
 
-#endif //DISABLE_LCD
+eAutoInitPtr<gLCDDC> init_gLCDDC(eAutoInitNumbers::graphic-1, "gLCDDC");