X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b39fc8d7b1b853cb15f39d51617214b7b90a8872..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/dfb/wrapdfb.cpp?ds=sidebyside diff --git a/src/dfb/wrapdfb.cpp b/src/dfb/wrapdfb.cpp index f81fdb316c..6159b7df16 100644 --- a/src/dfb/wrapdfb.cpp +++ b/src/dfb/wrapdfb.cpp @@ -36,7 +36,7 @@ bool wxDfbCheckReturn(DFBResult code) // these are programming errors, assert: #define DFB_ASSERT(code) \ case code: \ - wxFAIL_MSG( _T("DirectFB error: ") _T(#code) ); \ + wxFAIL_MSG( "DirectFB error: " wxT(#code) ); \ return false \ DFB_ASSERT(DFB_DEAD); @@ -61,7 +61,7 @@ bool wxDfbCheckReturn(DFBResult code) default: // FIXME: should handle the errors individually - wxLogError(_("DirectFB error %d occured."), (int)code); + wxLogError(_("DirectFB error %d occurred."), (int)code); return false; } } @@ -105,7 +105,13 @@ wxIDirectFBSurfacePtr wxIDirectFB::GetPrimarySurface() { 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); } @@ -140,7 +146,7 @@ wxIDirectFBSurface::CreateCompatible(const wxSize& sz, int flags) 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)(