aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorTravis Howell2005-05-09 12:12:14 +0000
committerTravis Howell2005-05-09 12:12:14 +0000
commit2f1ff2afec4a760d663508b768267309d746904b (patch)
treec38bb623976eeecbe841d8e02273db9ff5d2625c /queen
parenta0d6b39d9bae26f0076489373acc8934f7819fc7 (diff)
downloadscummvm-rg350-2f1ff2afec4a760d663508b768267309d746904b.tar.gz
scummvm-rg350-2f1ff2afec4a760d663508b768267309d746904b.tar.bz2
scummvm-rg350-2f1ff2afec4a760d663508b768267309d746904b.zip
Use debugger for errors, where possible.
svn-id: r17998
Diffstat (limited to 'queen')
-rw-r--r--queen/queen.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/queen/queen.cpp b/queen/queen.cpp
index 4a3f045a4d..cb16bf6676 100644
--- a/queen/queen.cpp
+++ b/queen/queen.cpp
@@ -349,6 +349,20 @@ void QueenEngine::findGameStateDescriptions(char descriptions[100][32]) {
void QueenEngine::errorString(const char *buf1, char *buf2) {
strcpy(buf2, buf1);
+
+#ifdef _WIN32_WCE
+ if (isSmartphone())
+ return;
+#endif
+
+ // Unless an error -originated- within the debugger, spawn the
+ // debugger. Otherwise exit out normally.
+ if (_debugger && !_debugger->isAttached()) {
+ // (Print it again in case debugger segfaults)
+ printf("%s\n", buf2);
+ _debugger->attach(buf2);
+ _debugger->onFrame();
+ }
}
int QueenEngine::go() {