From e095dc06cd47b72e4362ecb8294f30be0072cfd7 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 25 Nov 2011 19:29:17 +0000 Subject: [PATCH] Hacks for Mac, LC_CTYPE must be "" and a wxSafeYield breaks something during FrameMain construction Originally committed to SVN as r5913. --- aegisub/src/frame_main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aegisub/src/frame_main.cpp b/aegisub/src/frame_main.cpp index d992b159f..9d375b1d6 100644 --- a/aegisub/src/frame_main.cpp +++ b/aegisub/src/frame_main.cpp @@ -111,6 +111,10 @@ FrameMain::FrameMain (wxArrayString args) // However LC_NUMERIC must be "C", otherwise some parsing fails. setlocale(LC_NUMERIC, "C"); #endif +#ifdef __APPLE__ + // Apple's wprintf() and family breaks with CTYPE set to "C" + setlocale(LC_CTYPE, ""); +#endif StartupLog("Initializing context models"); AssFile::top = context->ass = new AssFile; @@ -142,7 +146,9 @@ FrameMain::FrameMain (wxArrayString args) StartupLog("Install PNG handler"); wxImage::AddHandler(new wxPNGHandler); +#ifndef __APPLE__ wxSafeYield(); +#endif StartupLog("Apply saved Maximized state"); if (OPT_GET("App/Maximized")->GetBool()) Maximize(true);