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:
parent
2074fad2cf
commit
0ab903a9e2
2 changed files with 28 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue