use physical device from framebuffer instead of hardcoded value, blit after compositing
[enigma2.git] / lib / gdi / gfbdc.cpp
index 02ebc4f..80dd247 100644 (file)
@@ -9,6 +9,13 @@
 
 gFBDC *gFBDC::instance;
 
+ePtr<gFBDC> NewgFBDCPtr(void)
+{
+       ePtr<gFBDC> ptr;
+       gFBDC::getInstance(ptr);
+       return ptr;
+}
+
 gFBDC::gFBDC()
 {
        instance=this;
@@ -124,9 +131,13 @@ void gFBDC::exec(gOpcode *o)
 
                ++t;
 
+               fb->blit();
                fb->waitVSync();
                break;
        }
+       case gOpcode::flush:
+               fb->blit();
+               break;
        default:
                gDC::exec(o);
                break;
@@ -178,7 +189,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;
 
@@ -232,6 +243,6 @@ void gFBDC::reloadSettings()
 }
 
 // eAutoInitPtr<gFBDC> init_gFBDC(eAutoInitNumbers::graphic-1, "GFBDC");
-#ifndef SDLDC
+#ifndef WITH_SDL
 eAutoInitPtr<gFBDC> init_gFBDC(eAutoInitNumbers::graphic-1, "GFBDC");
 #endif