X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef344ff86223f1f0961f025c0b249c898529c095..89fcec9514fd890de58da83118363570e2482bc9:/src/mgl/app.cpp?ds=sidebyside diff --git a/src/mgl/app.cpp b/src/mgl/app.cpp index 2027810bd5..c5ff7897f0 100644 --- a/src/mgl/app.cpp +++ b/src/mgl/app.cpp @@ -18,12 +18,14 @@ #pragma hdrstop #endif + #ifndef WX_PRECOMP #include "wx/settings.h" #include "wx/module.h" #include "wx/evtloop.h" #include "wx/frame.h" #include "wx/dialog.h" + #include "wx/log.h" #include "wx/intl.h" #endif @@ -31,6 +33,12 @@ #include "wx/fontutil.h" #include "wx/mgl/private.h" +#define MGL_DEBUG + +#if defined(MGL_DEBUG) && !defined(__WXDEBUG__) +#undef MGL_DEBUG +#endif + //----------------------------------------------------------------------------- // Global data //----------------------------------------------------------------------------- @@ -74,8 +82,6 @@ bool wxYield() while (wxEventLoop::GetActive()->Pending()) wxEventLoop::GetActive()->Dispatch(); } - else - MGL_wmUpdateDC(g_winMng); // FIXME_MGL -- temporary hack, please remove /* it's necessary to call ProcessIdle() to update the frames sizes which might have been changed (it also will update other things set from @@ -148,6 +154,12 @@ bool wxApp::OnInitGui() if ( !wxAppBase::OnInitGui() ) return FALSE; +#ifdef MGL_DEBUG + // That damn MGL redirects stdin and stdout to physical console + FILE *file = fopen("stderr", "wt"); + wxLog::SetActiveTarget(new wxLogStderr(file)); +#endif + return TRUE; } @@ -209,12 +221,8 @@ bool wxApp::SendIdleEvents(wxWindow* win) win->GetEventHandler()->ProcessEvent(event); -#if 0 // FIXME_MGL - what the hell it is? - win->OnInternalIdle(); - if ( event.MoreRequested() ) needMore = TRUE; -#endif wxNode* node = win->GetChildren().First(); while (node)