summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/log.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/log.cpp b/src/log.cpp
index b7a0545a..0d54a368 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -20,11 +20,13 @@
*/
#include "log.h"
+
#ifdef WIN32
- #include "utils/wingettimeofday.h"
+#include "utils/wingettimeofday.h"
#else
- #include <sys/time.h>
+#include <sys/time.h>
#endif
+
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif
@@ -101,9 +103,14 @@ void Logger::error(const std::string &error_text)
MessageBox(NULL, error_text.c_str(), "Error", MB_ICONERROR | MB_OK);
#elif defined __APPLE__
Str255 msg;
- c2pstrcpy(msg, error_text.c_str());
- StandardAlert(kAlertStopAlert, "\pError",
- (ConstStr255Param)msg, NULL, NULL);
+ CFStringRef error;
+ error = CFStringCreateWithCString(NULL,
+ error_text.c_str(),
+ kCFStringEncodingMacRoman);
+ CFStringGetPascalString(error, msg, 255, kCFStringEncodingMacRoman);
+ StandardAlert(kAlertStopAlert,
+ "\pError",
+ (ConstStr255Param) msg, NULL, NULL);
#else
std::cerr << "Error: " << error_text << std::endl;
#endif