]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/app.cpp
NUL terminate the string in UngetWriteBuf(len) (bug 1594189)
[wxWidgets.git] / src / dfb / app.cpp
index 4618b16e4b9789412dd32174fcd697a77fad4657..5f7a8004eb02d147a8e1c66b31cd33a474655aac 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "wx/evtloop.h"
 #include "wx/dfb/private.h"
+#include "wx/private/fontmgr.h"
 
 //-----------------------------------------------------------------------------
 // wxApp initialization
@@ -50,9 +51,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
     if ( !wxIDirectFB::Get() )
         return false;
 
-    #warning "FIXME: theme override is temporary"
-    wxTheme::Set(wxTheme::Create(_T("gtk")));
-
     return true;
 }
 
@@ -60,6 +58,9 @@ void wxApp::CleanUp()
 {
     wxAppBase::CleanUp();
 
+    wxFontsManager::CleanUp();
+
+    wxEventLoop::CleanUp();
     wxIDirectFB::CleanUp();
 }
 
@@ -69,16 +70,11 @@ void wxApp::CleanUp()
 
 static wxVideoMode GetCurrentVideoMode()
 {
-    wxVideoMode m;
-
-    wxIDirectFBSurfacePtr surface(wxIDirectFB::Get()->GetPrimarySurface());
-    if ( !surface )
-        return m; // invalid
-
-    surface->GetSize(&m.w, &m.h);
-    m.bpp = surface->GetDepth();
+    wxIDirectFBDisplayLayerPtr layer(wxIDirectFB::Get()->GetDisplayLayer());
+    if ( !layer )
+        return wxVideoMode(); // invalid
 
-    return m;
+    return layer->GetVideoMode();
 }
 
 wxVideoMode wxApp::GetDisplayMode() const