diff options
| author | Travis Howell | 2005-05-09 12:12:14 +0000 |
|---|---|---|
| committer | Travis Howell | 2005-05-09 12:12:14 +0000 |
| commit | 2f1ff2afec4a760d663508b768267309d746904b (patch) | |
| tree | c38bb623976eeecbe841d8e02273db9ff5d2625c /sky | |
| parent | a0d6b39d9bae26f0076489373acc8934f7819fc7 (diff) | |
| download | scummvm-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 'sky')
| -rw-r--r-- | sky/sky.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sky/sky.cpp b/sky/sky.cpp index 10b5c4ec54..c3b93ebd76 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -132,6 +132,20 @@ SkyEngine::~SkyEngine() { void SkyEngine::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(); + } } void SkyEngine::initVirgin() { |
