COMMON: Added checkers for debug channels.

Sometimes there is a need to add debug execution and enable it from
the command line. Now it is possible, both with debug levels and channels
This commit is contained in:
Eugene Sandulenko 2016-08-19 09:38:25 +02:00
parent 2074fad2cf
commit 0ab903a9e2
2 changed files with 28 additions and 5 deletions

View file

@ -120,6 +120,18 @@ bool DebugManager::isDebugChannelEnabled(uint32 channel) {
} // End of namespace Common
bool debugLevelSet(int level) {
return level <= gDebugLevel;
}
bool debugChannelSet(int level, uint32 debugChannels) {
if (gDebugLevel != 11)
if (level > gDebugLevel || !(DebugMan.isDebugChannelEnabled(debugChannels)))
return false;
return true;
}
#ifndef DISABLE_TEXT_CONSOLE