]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/wrapdfb.cpp
Use gdk_window_invalidate instead of gtk_widget_queue_draw as the latter doesn't...
[wxWidgets.git] / src / dfb / wrapdfb.cpp
index d1e9f5ae4a9752323961dc998328199e385220e2..c474b48e2b44c8482e0e7be30d40f4575888aaf8 100644 (file)
@@ -36,7 +36,7 @@ bool wxDfbCheckReturn(DFBResult code)
         // these are programming errors, assert:
         #define DFB_ASSERT(code)                                        \
             case code:                                                  \
         // these are programming errors, assert:
         #define DFB_ASSERT(code)                                        \
             case code:                                                  \
-                wxFAIL_MSG( _T("DirectFB error: ") _T(#code) );         \
+                wxFAIL_MSG( "DirectFB error: " _T(#code) );         \
                 return false                                            \
 
         DFB_ASSERT(DFB_DEAD);
                 return false                                            \
 
         DFB_ASSERT(DFB_DEAD);
@@ -105,7 +105,13 @@ wxIDirectFBSurfacePtr wxIDirectFB::GetPrimarySurface()
 {
     DFBSurfaceDescription desc;
     desc.flags = DSDESC_CAPS;
 {
     DFBSurfaceDescription desc;
     desc.flags = DSDESC_CAPS;
-    desc.caps = DSCAPS_PRIMARY;
+    // NB: see dcscreen.cpp for why we request double-buffered surface
+    //
+    //     This assumes the cooperative level is DFSCL_NORMAL (that's the
+    //     default and wx doesn't modify it anywhere); if we ever support
+    //     other cooperative levels, DSCAPS_DOUBLE should *not* be used with
+    //     them.
+    desc.caps = DFBSurfaceCapabilities(DSCAPS_PRIMARY | DSCAPS_DOUBLE);
     return CreateSurface(&desc);
 }
 
     return CreateSurface(&desc);
 }
 
@@ -113,6 +119,13 @@ wxIDirectFBSurfacePtr wxIDirectFB::GetPrimarySurface()
 // wxIDirectFBSurface
 //-----------------------------------------------------------------------------
 
 // wxIDirectFBSurface
 //-----------------------------------------------------------------------------
 
+DFBSurfacePixelFormat wxIDirectFBSurface::GetPixelFormat()
+{
+    DFBSurfacePixelFormat format = DSPF_UNKNOWN;
+    GetPixelFormat(&format);
+    return format;
+}
+
 int wxIDirectFBSurface::GetDepth()
 {
     DFBSurfacePixelFormat format = DSPF_UNKNOWN;
 int wxIDirectFBSurface::GetDepth()
 {
     DFBSurfacePixelFormat format = DSPF_UNKNOWN;
@@ -133,7 +146,7 @@ wxIDirectFBSurface::CreateCompatible(const wxSize& sz, int flags)
             return NULL;
     }
 
             return NULL;
     }
 
-    wxCHECK_MSG( size.x > 0 && size.y > 0, NULL, _T("invalid size") );
+    wxCHECK_MSG( size.x > 0 && size.y > 0, NULL, "invalid size" );
 
     DFBSurfaceDescription desc;
     desc.flags = (DFBSurfaceDescriptionFlags)(
 
     DFBSurfaceDescription desc;
     desc.flags = (DFBSurfaceDescriptionFlags)(