Hacks for Mac, LC_CTYPE must be "" and a wxSafeYield breaks something during FrameMain construction

Originally committed to SVN as r5913.
This commit is contained in:
Thomas Goyne 2011-11-25 19:29:17 +00:00
parent 0c5cb8e490
commit e095dc06cd

View file

@ -111,6 +111,10 @@ FrameMain::FrameMain (wxArrayString args)
// However LC_NUMERIC must be "C", otherwise some parsing fails. // However LC_NUMERIC must be "C", otherwise some parsing fails.
setlocale(LC_NUMERIC, "C"); setlocale(LC_NUMERIC, "C");
#endif #endif
#ifdef __APPLE__
// Apple's wprintf() and family breaks with CTYPE set to "C"
setlocale(LC_CTYPE, "");
#endif
StartupLog("Initializing context models"); StartupLog("Initializing context models");
AssFile::top = context->ass = new AssFile; AssFile::top = context->ass = new AssFile;
@ -142,7 +146,9 @@ FrameMain::FrameMain (wxArrayString args)
StartupLog("Install PNG handler"); StartupLog("Install PNG handler");
wxImage::AddHandler(new wxPNGHandler); wxImage::AddHandler(new wxPNGHandler);
#ifndef __APPLE__
wxSafeYield(); wxSafeYield();
#endif
StartupLog("Apply saved Maximized state"); StartupLog("Apply saved Maximized state");
if (OPT_GET("App/Maximized")->GetBool()) Maximize(true); if (OPT_GET("App/Maximized")->GetBool()) Maximize(true);