diff --git a/engines/private/detection.cpp b/engines/private/detection.cpp index 8af66e8c4b9..ab85cd184db 100644 --- a/engines/private/detection.cpp +++ b/engines/private/detection.cpp @@ -22,6 +22,14 @@ #include "base/plugins.h" #include "engines/advancedDetector.h" +#include "private/private.h" + +static const DebugChannelDef debugFlagList[] = { + {Private::kPrivateDebugFunction, "functions", "Function execution debug channel"}, + {Private::kPrivateDebugCode, "code", "Code execution debug channel"}, + {Private::kPrivateDebugScript, "script", "Script execution debug channel"}, + DEBUG_CHANNEL_END +}; namespace Private { static const PlainGameDescriptor privateGames[] = { @@ -179,6 +187,10 @@ public: const char *getOriginalCopyright() const override { return "Copyright (C) Brooklyn Multimedia"; } + + const DebugChannelDef *getDebugChannels() const override { + return debugFlagList; + } }; REGISTER_PLUGIN_STATIC(PRIVATE_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, PrivateMetaEngineDetection); diff --git a/engines/private/private.cpp b/engines/private/private.cpp index a6ffba3aa96..910664c4aaf 100644 --- a/engines/private/private.cpp +++ b/engines/private/private.cpp @@ -52,11 +52,6 @@ PrivateEngine::PrivateEngine(OSystem *syst, const ADGameDescription *gd) _maxNumberClicks(0), _sirenWarning(0), _screenW(640), _screenH(480) { _rnd = new Common::RandomSource("private"); - // Debug channels - DebugMan.addDebugChannel(kPrivateDebugFunction, "functions", "Function execution debug channel"); - DebugMan.addDebugChannel(kPrivateDebugCode, "code", "Code execution debug channel"); - DebugMan.addDebugChannel(kPrivateDebugScript, "script", "Script execution debug channel"); - // Global object for external reference g_private = this;