diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-02-20 18:25:03 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-02-20 18:25:03 +0000 |
commit | eadbe0cb009b8c8fec622946f0b0109a2f07b1f1 (patch) | |
tree | a45211dea0c69c4922dd5f741eb54f88159fa639 /src | |
parent | 4bc3390e60e0632f03e0d1be55ad2cf53bcaf8c8 (diff) | |
download | mana-eadbe0cb009b8c8fec622946f0b0109a2f07b1f1.tar.gz mana-eadbe0cb009b8c8fec622946f0b0109a2f07b1f1.tar.bz2 mana-eadbe0cb009b8c8fec622946f0b0109a2f07b1f1.tar.xz mana-eadbe0cb009b8c8fec622946f0b0109a2f07b1f1.zip |
Applied patch by trapdoor to fix the usage of a deprecated function on MacOS X
10.4 and later.
Diffstat (limited to 'src')
-rw-r--r-- | src/log.cpp | 17 |
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 |