Merge branch 'bug_347_adenin_unicable_xml'
[enigma2.git] / lib / gdi / gfbdc.cpp
index d2f8dad25462f4b1677b401ad88fbc7c475fd736..a4f65ebc2d24dc5082b18405bc4a66d59912df7b 100644 (file)
@@ -7,18 +7,8 @@
 
 #include <time.h>
 
-gFBDC *gFBDC::instance;
-
-ePtr<gFBDC> NewgFBDCPtr(void)
-{
-       ePtr<gFBDC> ptr;
-       gFBDC::getInstance(ptr);
-       return ptr;
-}
-
 gFBDC::gFBDC()
 {
-       instance=this;
        fb=new fbClass;
 
        if (!fb->Available())
@@ -34,7 +24,6 @@ gFBDC::~gFBDC()
 {
        delete fb;
        delete[] surface.clut.data;
-       instance=0;
 }
 
 void gFBDC::calcRamp()
@@ -91,7 +80,7 @@ void gFBDC::setPalette()
        fb->PutCMAP();
 }
 
-void gFBDC::exec(gOpcode *o)
+void gFBDC::exec(const gOpcode *o)
 {
        switch (o->opcode)
        {
@@ -131,6 +120,7 @@ void gFBDC::exec(gOpcode *o)
 
                ++t;
 
+               fb->blit();
                fb->waitVSync();
                break;
        }
@@ -188,7 +178,7 @@ void gFBDC::setResolution(int xres, int yres)
        surface.data = fb->lfb;
        surface.offset = 0;
 
-       surface.data_phys = 50*1024*1024; // FIXME
+       surface.data_phys = fb->getPhysAddr();
 
        int fb_size = surface.stride * surface.y;
 
@@ -241,7 +231,4 @@ void gFBDC::reloadSettings()
        setPalette();
 }
 
-// eAutoInitPtr<gFBDC> init_gFBDC(eAutoInitNumbers::graphic-1, "GFBDC");
-#ifndef WITH_SDL
 eAutoInitPtr<gFBDC> init_gFBDC(eAutoInitNumbers::graphic-1, "GFBDC");
-#endif