mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-18 18:30:59 +00:00
COMMON: Implement sanity check to adding debug channels
This commit is contained in:
parent
821dcd0a99
commit
27503e46a2
@ -162,9 +162,14 @@ bool DebugManager::isDebugChannelEnabled(uint32 channel, bool enforce) {
|
||||
}
|
||||
|
||||
void DebugManager::addDebugChannels(const DebugChannelDef *channels) {
|
||||
int added = 0;
|
||||
for (uint i = 0; channels[i].channel != 0; ++i) {
|
||||
addDebugChannel(channels[i].channel, channels[i].name, channels[i].description);
|
||||
added++;
|
||||
}
|
||||
|
||||
if (!added)
|
||||
warning("DebugManager::addDebugChannels(): No debug channels were added, list is empty");
|
||||
}
|
||||
|
||||
} // End of namespace Common
|
||||
|
Loading…
x
Reference in New Issue
Block a user