diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp index 8eac0465b35..5dc48192ba2 100644 --- a/engines/director/detection.cpp +++ b/engines/director/detection.cpp @@ -50,6 +50,7 @@ static const DebugChannelDef debugFlagList[] = { {Director::kDebug32bpp, "32bpp", "Work in 32bpp mode"}, {Director::kDebugCompile, "compile", "Lingo Compilation"}, {Director::kDebugCompileOnly, "compileonly", "Skip Lingo code execution"}, + {Director::kDebugConsole, "console", "Open the debug console"}, {Director::kDebugDesktop, "desktop", "Show the Classic Mac desktop"}, {Director::kDebugEndVideo, "endvideo", "Fake that the end of video is reached setting"}, {Director::kDebugEvents, "events", "Event processing"}, diff --git a/engines/director/director.cpp b/engines/director/director.cpp index 08a3f39daa3..944b5363c1c 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -229,6 +229,11 @@ Common::Error DirectorEngine::run() { if (err.getCode() != Common::kNoError) return err; + if (debugChannelSet(-1, kDebugConsole)) { + g_debugger->attach(); + g_system->updateScreen(); + } + bool loop = true; while (loop) { diff --git a/engines/director/director.h b/engines/director/director.h index 443329f0eb0..8f48a6b29aa 100644 --- a/engines/director/director.h +++ b/engines/director/director.h @@ -88,6 +88,7 @@ enum { kDebugEndVideo = 1 << 17, kDebugLingoStrict = 1 << 18, kDebugSound = 1 << 19, + kDebugConsole = 1 << 20, }; struct MovieReference {