From e49f1e0050d7e948df0bc797f47ee250b0f44dae Mon Sep 17 00:00:00 2001 From: David Athay Date: Sun, 25 Mar 2012 17:55:25 -0500 Subject: Made changes to compile on Mac OSX 10.6 and later MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also added Xcode project for others to compile for Mac OSX. Reviewed-by: Thorbjørn Lindeijer --- src/log.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/log.cpp') diff --git a/src/log.cpp b/src/log.cpp index fc36ea75..eae0a82b 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -24,7 +24,7 @@ #ifdef _WIN32 #include #elif __APPLE__ -#include +void MacDialogBox(const std::string &error); #endif #include @@ -109,15 +109,7 @@ void Logger::error(const std::string &error_text) #ifdef _WIN32 MessageBox(NULL, error_text.c_str(), "Error", MB_ICONERROR | MB_OK); #elif defined __APPLE__ - Str255 msg; - CFStringRef error; - error = CFStringCreateWithCString(NULL, - error_text.c_str(), - kCFStringEncodingMacRoman); - CFStringGetPascalString(error, msg, 255, kCFStringEncodingMacRoman); - StandardAlert(kAlertStopAlert, - "\pError", - (ConstStr255Param) msg, NULL, NULL); + MacDialogBox(error_text); #elif defined __linux__ || __linux std::cerr << "Error: " << error_text << std::endl; std::string msg="xmessage \"" + error_text + "\""; -- cgit v1.2.3-70-g09d2