diff options
Diffstat (limited to 'sky/sky.cpp')
-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() { |