aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-05-09 11:39:31 +0000
committerTravis Howell2005-05-09 11:39:31 +0000
commita0d6b39d9bae26f0076489373acc8934f7819fc7 (patch)
treefe9cc61e23b14e5736a5e7e7e3892c4714136a24
parent9c8041633498ae21de22d574c0476d4a16198812 (diff)
downloadscummvm-rg350-a0d6b39d9bae26f0076489373acc8934f7819fc7.tar.gz
scummvm-rg350-a0d6b39d9bae26f0076489373acc8934f7819fc7.tar.bz2
scummvm-rg350-a0d6b39d9bae26f0076489373acc8934f7819fc7.zip
Use debugger for errors.
svn-id: r17997
-rw-r--r--simon/simon.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 6614ceda4b..7d720566e2 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -755,6 +755,14 @@ SimonEngine::~SimonEngine() {
void SimonEngine::errorString(const char *buf1, char *buf2) {
strcpy(buf2, buf1);
+
+ // Unless an error -originated- within the debugger, spawn the debugger. Otherwise
+ // exit out normally.
+ if (_debugger && !_debugger->isAttached()) {
+ printf("%s\n", buf2); // (Print it again in case debugger segfaults)
+ _debugger->attach(buf2);
+ _debugger->onFrame();
+ }
}
void palette_fadeout(uint32 *pal_values, uint num) {