From b2f5ee4ab968490de853ea511338f459a5fa2cae Mon Sep 17 00:00:00 2001 From: ysj1173886760 <1173886760@qq.com> Date: Sat, 15 May 2021 20:53:34 +0800 Subject: [PATCH] CGE2: move debug channels to metaEngineDetection --- engines/cge2/cge2.cpp | 3 --- engines/cge2/detection.cpp | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp index d988dda28ea..48cafe131a9 100644 --- a/engines/cge2/cge2.cpp +++ b/engines/cge2/cge2.cpp @@ -46,9 +46,6 @@ namespace CGE2 { CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription) : Engine(syst), _gameDescription(gameDescription), _randomSource("cge2") { - // Debug/console setup - DebugMan.addDebugChannel(kCGE2DebugOpcode, "opcode", "CGE2 opcode debug channel"); - _resman = nullptr; _vga = nullptr; _midiPlayer = nullptr; diff --git a/engines/cge2/detection.cpp b/engines/cge2/detection.cpp index 5e6d03ef432..b369e0d0c0f 100644 --- a/engines/cge2/detection.cpp +++ b/engines/cge2/detection.cpp @@ -28,6 +28,12 @@ #include "engines/advancedDetector.h" #include "common/translation.h" #include "cge2/fileio.h" +#include "cge2/cge2.h" + +static const DebugChannelDef debugFlagList[] = { + {CGE2::kCGE2DebugOpcode, "opcode", "CGE2 opcode debug channel"}, + DEBUG_CHANNEL_END +}; namespace CGE2 { @@ -115,6 +121,10 @@ public: return "Sfinx (C) 1994-1997 Janusz B. Wisniewski and L.K. Avalon"; } + const DebugChannelDef *getDebugChannels() const override { + return debugFlagList; + } + ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override; };