diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-09-10 20:10:38 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-09-10 20:10:38 +0000 |
commit | a812da5e5c866b6fbd27b57bbccf9f8a42d40318 (patch) | |
tree | 1cb727f13ae2b5eb51599e45768ccc1ed78759bc /src | |
parent | 73fe28e6ad029106280f9c73e2bb2bd53d991072 (diff) | |
download | mana-client-a812da5e5c866b6fbd27b57bbccf9f8a42d40318.tar.gz mana-client-a812da5e5c866b6fbd27b57bbccf9f8a42d40318.tar.bz2 mana-client-a812da5e5c866b6fbd27b57bbccf9f8a42d40318.tar.xz mana-client-a812da5e5c866b6fbd27b57bbccf9f8a42d40318.zip |
Committed patch by Nayr for displaying a messagebox when an error occurs on
MacOS.
Diffstat (limited to 'src')
-rw-r--r-- | src/log.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/log.cpp b/src/log.cpp index f24461cb..65519cba 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -23,6 +23,9 @@ #ifdef WIN32 #include <windows.h> #endif +#ifdef __APPLE__ +#include <Carbon/Carbon.h> +#endif #include <stdarg.h> #include <iostream> @@ -90,6 +93,11 @@ void Logger::error(const std::string &error_text) log("Error: %s", error_text.c_str()); #ifdef WIN32 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); #else std::cerr << "Error: " << error_text << std::endl; #endif |