diff options
author | Willem Jan Palenstijn | 2009-07-19 21:06:25 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-07-19 21:06:25 +0000 |
commit | 00af395ab6a07250c7f3e7b8870cf328c72cde47 (patch) | |
tree | cf2dac9989fefe9659055c7d1d9d457c1e660072 /gui | |
parent | 4bd5023d235462ccc559f26422f7ba4e6d31ce47 (diff) | |
download | scummvm-rg350-00af395ab6a07250c7f3e7b8870cf328c72cde47.tar.gz scummvm-rg350-00af395ab6a07250c7f3e7b8870cf328c72cde47.tar.bz2 scummvm-rg350-00af395ab6a07250c7f3e7b8870cf328c72cde47.zip |
Fix compilation with USE_CONSOLE = 0
svn-id: r42623
Diffstat (limited to 'gui')
-rw-r--r-- | gui/debugger.cpp | 9 | ||||
-rw-r--r-- | gui/debugger.h | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gui/debugger.cpp b/gui/debugger.cpp index 6b55681a25..dd292a3a8a 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -39,9 +39,11 @@ Debugger::Debugger() { _isAttached = false; _errStr = NULL; _firstTime = true; +#if USE_CONSOLE _debuggerDialog = new GUI::ConsoleDialog(1.0f, 0.67f); _debuggerDialog->setInputCallback(debuggerInputCallback, this); _debuggerDialog->setCompletionCallback(debuggerCompletionCallback, this); +#endif //DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit)); DCmd_Register("exit", WRAP_METHOD(Debugger, Cmd_Exit)); @@ -55,7 +57,9 @@ Debugger::Debugger() { } Debugger::~Debugger() { +#if USE_CONSOLE delete _debuggerDialog; +#endif } @@ -357,8 +361,11 @@ bool Debugger::Cmd_Exit(int argc, const char **argv) { // Print a list of all registered commands (and variables, if any), // nicely word-wrapped. bool Debugger::Cmd_Help(int argc, const char **argv) { - +#if USE_CONSOLE const int charsPerLine = _debuggerDialog->getCharsPerLine(); +#else + const int charsPerLine = 80; +#endif int width, size; uint i; diff --git a/gui/debugger.h b/gui/debugger.h index e84da594be..1baf99faeb 100644 --- a/gui/debugger.h +++ b/gui/debugger.h @@ -35,7 +35,7 @@ namespace GUI { // Choose between text console or ScummConsole #define USE_CONSOLE 1 -#ifdef USE_CONSOLE +#if USE_CONSOLE class ConsoleDialog; #endif @@ -86,7 +86,9 @@ private: bool _isAttached; char *_errStr; bool _firstTime; +#if USE_CONSOLE GUI::ConsoleDialog *_debuggerDialog; +#endif protected: // Hook for subclasses: Called just before enter() is run |