aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/commandLine.cpp4
-rw-r--r--base/main.cpp4
-rw-r--r--base/plugins.h8
3 files changed, 14 insertions, 2 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 2c24c018ee..c2b4ea765f 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -97,6 +97,7 @@ static const char HELP_STRING[] =
" -d, --debuglevel=NUM Set debug verbosity level\n"
" --debugflags=FLAGS Enable engine specific debug flags\n"
" (separated by commas)\n"
+ " --debug-channels-only Show only the specified debug channels\n"
" -u, --dump-scripts Enable script dumping if a directory called 'dumps'\n"
" exists in the current directory\n"
"\n"
@@ -426,6 +427,9 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
DO_LONG_OPTION("debugflags")
END_OPTION
+ DO_LONG_OPTION_BOOL("debug-channels-only")
+ END_OPTION
+
DO_OPTION('e', "music-driver")
END_OPTION
diff --git a/base/main.cpp b/base/main.cpp
index 349f719ed5..1667106543 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -391,6 +391,10 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
} else if (ConfMan.hasKey("debugflags"))
specialDebug = ConfMan.get("debugflags");
+ if (settings.contains("debug-channels-only"))
+ gDebugChannelsOnly = true;
+
+
PluginManager::instance().init();
PluginManager::instance().loadAllPlugins(); // load plugins for cached plugin manager
diff --git a/base/plugins.h b/base/plugins.h
index 6037fc2d71..2793ff3ffd 100644
--- a/base/plugins.h
+++ b/base/plugins.h
@@ -79,8 +79,12 @@ extern int pluginTypeVersions[PLUGIN_TYPE_MAX];
#define PLUGIN_ENABLED_STATIC(ID) \
(ENABLE_##ID && !PLUGIN_ENABLED_DYNAMIC(ID))
-#define PLUGIN_ENABLED_DYNAMIC(ID) \
- (ENABLE_##ID && (ENABLE_##ID == DYNAMIC_PLUGIN) && defined(DYNAMIC_MODULES))
+#ifdef DYNAMIC_MODULES
+ #define PLUGIN_ENABLED_DYNAMIC(ID) \
+ (ENABLE_##ID && (ENABLE_##ID == DYNAMIC_PLUGIN))
+#else
+ #define PLUGIN_ENABLED_DYNAMIC(ID) 0
+#endif
// see comments in backends/plugins/elf/elf-provider.cpp
#if defined(USE_ELF_LOADER) && defined(ELF_LOADER_CXA_ATEXIT)