X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c358c6601faad58edf218909bf1697ac148b1b1a..7fc0bd1c0541a819d51354a4a86f126dbb8ad08f:/src/common/appcmn.cpp diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 37b04e0e86..59e2ef34c6 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -49,6 +49,10 @@ #include "wx/msw/private.h" // includes windows.h for MessageBox() #endif +#if defined(__WXMAC__) + #include "wx/mac/private.h" // includes mac headers +#endif + // =========================================================================== // implementation // =========================================================================== @@ -166,7 +170,7 @@ bool wxAppBase::OnInit() OnInitCmdLine(parser); bool cont; - switch ( parser.Parse() ) + switch ( parser.Parse(FALSE /* don't show usage */) ) { case -1: cont = OnCmdLineHelp(parser); @@ -279,14 +283,15 @@ bool wxAppBase::OnCmdLineParsed(wxCmdLineParser& parser) unsigned w, h, bpp; if ( wxSscanf(modeDesc.c_str(), _T("%ux%u-%u"), &w, &h, &bpp) != 3 ) { - wxLogError(_("Unsupported display mode '%s'."), themeName.c_str()); + wxLogError(_("Invalid display mode specification '%s'."), modeDesc.c_str()); return FALSE; } - SetDisplayMode(wxDisplayModeInfo(wxSize(w, h), bpp)); + if ( !SetDisplayMode(wxDisplayModeInfo(w, h, bpp)) ) + return FALSE; } -#endif +#endif // __WXMGL__ return TRUE; } @@ -324,7 +329,7 @@ void wxTrap() { #if defined(__WXMSW__) && !defined(__WXMICROWIN__) DebugBreak(); -#elif defined(__WXMAC__) +#elif defined(__WXMAC__) && !defined(__DARWIN__) #if __powerc Debugger(); #else