summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-09-10 20:10:38 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-09-10 20:10:38 +0000
commita812da5e5c866b6fbd27b57bbccf9f8a42d40318 (patch)
tree1cb727f13ae2b5eb51599e45768ccc1ed78759bc
parent73fe28e6ad029106280f9c73e2bb2bd53d991072 (diff)
downloadmana-a812da5e5c866b6fbd27b57bbccf9f8a42d40318.tar.gz
mana-a812da5e5c866b6fbd27b57bbccf9f8a42d40318.tar.bz2
mana-a812da5e5c866b6fbd27b57bbccf9f8a42d40318.tar.xz
mana-a812da5e5c866b6fbd27b57bbccf9f8a42d40318.zip
Committed patch by Nayr for displaying a messagebox when an error occurs on
MacOS.
-rw-r--r--ChangeLog13
-rw-r--r--src/log.cpp8
2 files changed, 17 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 353421de..8982fee6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2005-08-30 Eugenio Favalli <elvenprogrammer@gmail.com>
+2005-09-10 Bjorn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/log.cpp: Committed patch by Nayr for displaying a messagebox
+ when an error occurs on MacOS.
+
+2005-09-09 Eugenio Favalli <elvenprogrammer@gmail.com>
* src/game.cpp: Fixes to dropped items network code
@@ -460,7 +465,7 @@
name for updates from "data" to "updates".
* src/game.cpp, src/gui/inventorywindow.cpp, src/gui/popupmenu.cpp,
src/gui/popupmenu.h: Cleaned up the showPopup() code, moved
- map"-related code into game.cpp, made the popup show up at mouse
+ "map"-related code into game.cpp, made the popup show up at mouse
coordinates instead of being aligned to tiles.
* src/being.cpp, src/being.h, src/engine.cpp, src/game.cpp, src/game.h,
src/gui/gui.cpp, src/net/protocol.cpp: Added an action enumeration to
@@ -483,8 +488,8 @@
2005-07-27 Björn Steinbrink <B.Steinbrink@gmx.de>
- * src/gui/gui.cpp, src/gui/gui.h: Removed continous mouse
- movement, that implementation wasn't suitable for a release.
+ * src/gui/gui.cpp, src/gui/gui.h: Removed continous mouse movement,
+ that implementation wasn't suitable for a release.
2005-07-26 Björn Steinbrink <B.Steinbrink@gmx.de>
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