From 651d22b873754cf4907a67f0f3c7e18eafdd7636 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 16 Sep 2006 19:31:23 +0000 Subject: * Added virtual Engine::getDebugger() method * Removed code from errorString() methods that hooked the debugger(s) into error(), in favor of using getDebugger() from within error() * As a consequence, removed most custom errorString() methods svn-id: r23894 --- engines/sky/sky.cpp | 19 ++----------------- engines/sky/sky.h | 2 +- 2 files changed, 3 insertions(+), 18 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 48b3b1515b..f30a98a9bc 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -55,7 +55,6 @@ extern bool toolbar_drawn; extern bool draw_keyboard; -extern bool isSmartphone(void); #endif /* @@ -148,22 +147,8 @@ SkyEngine::~SkyEngine() { free(_itemList[i]); } -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(); - } +GUI::Debugger *SkyEngine::getDebugger() { + return _debugger; } void SkyEngine::initVirgin() { diff --git a/engines/sky/sky.h b/engines/sky/sky.h index 40b4630597..bb119b06dc 100644 --- a/engines/sky/sky.h +++ b/engines/sky/sky.h @@ -55,7 +55,7 @@ class Debugger; class SkyCompact; class SkyEngine : public Engine { - void errorString(const char *buf_input, char *buf_output); + GUI::Debugger *getDebugger(); protected: byte _keyPressed, _keyFlags; bool _floppyIntro; -- cgit v1.2.3