diff options
-rw-r--r-- | queen/queen.cpp | 14 | ||||
-rw-r--r-- | simon/simon.cpp | 12 | ||||
-rw-r--r-- | sky/sky.cpp | 14 |
3 files changed, 37 insertions, 3 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() { diff --git a/simon/simon.cpp b/simon/simon.cpp index 7d720566e2..1621cd1253 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -756,10 +756,16 @@ 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. +#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()) { - printf("%s\n", buf2); // (Print it again in case debugger segfaults) + // (Print it again in case debugger segfaults) + printf("%s\n", buf2); _debugger->attach(buf2); _debugger->onFrame(); } 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() { |