X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b43a988613537e165d412d09297c0e5e676b1d03..7b9f73d205e75635fd3cd6c19cce1d8edf91b045:/src/mgl/window.cpp diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 217508e325..170bf9cb43 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -469,12 +469,17 @@ END_EVENT_TABLE() // constructors and such // ---------------------------------------------------------------------------- +extern wxDisplayModeInfo wxGetDefaultDisplayMode(); + void wxWindowMGL::Init() { // First of all, make sure window manager is up and running. If it is // not the case, initialize it in default display mode if ( !g_winMng ) - wxTheApp->SetDisplayMode(wxDisplayModeInfo(640, 480, 16)); + { + if ( !wxTheApp->SetDisplayMode(wxGetDefaultDisplayMode()) ) + wxFatalError(_("Cannot initialize display.")); + } // generic: InitBase();