mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-17 23:44:22 +00:00
COMMON: added a debugC variant which only takes a debug channel mask
svn-id: r39054
This commit is contained in:
parent
00db87563a
commit
81943a9f8c
@ -214,12 +214,25 @@ void debugN(int level, const char *s, ...) {
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
void debugC(int level, uint32 engine_level, const char *s, ...) {
|
||||
void debugC(int level, uint32 debugChannels, const char *s, ...) {
|
||||
va_list va;
|
||||
|
||||
// FIXME: Seems gDebugLevel 11 has a special meaning? Document that!
|
||||
if (gDebugLevel != 11)
|
||||
if (level > gDebugLevel || !(Common::gDebugLevelsEnabled & engine_level))
|
||||
if (level > gDebugLevel || !(Common::gDebugLevelsEnabled & debugChannels))
|
||||
return;
|
||||
|
||||
va_start(va, s);
|
||||
debugHelper(s, va);
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
void debugC(uint32 debugChannels, const char *s, ...) {
|
||||
va_list va;
|
||||
|
||||
// FIXME: Seems gDebugLevel 11 has a special meaning? Document that!
|
||||
if (gDebugLevel != 11)
|
||||
if (!(Common::gDebugLevelsEnabled & debugChannels))
|
||||
return;
|
||||
|
||||
va_start(va, s);
|
||||
|
@ -105,6 +105,7 @@ inline void debug(const char *s, ...) {}
|
||||
inline void debug(int level, const char *s, ...) {}
|
||||
inline void debugN(int level, const char *s, ...) {}
|
||||
inline void debugC(int level, uint32 engine_level, const char *s, ...) {}
|
||||
inline void debugC(uint32 engine_level, const char *s, ...) {}
|
||||
|
||||
|
||||
#else
|
||||
@ -141,7 +142,16 @@ void debugN(int level, const char *s, ...) GCC_PRINTF(2, 3);
|
||||
*
|
||||
* @see enableDebugChannel
|
||||
*/
|
||||
void debugC(int level, uint32 engine_level, const char *s, ...) GCC_PRINTF(3, 4);
|
||||
void debugC(int level, uint32 debugChannels, const char *s, ...) GCC_PRINTF(3, 4);
|
||||
|
||||
/**
|
||||
* Print a debug message to the text console (stderr), but only if
|
||||
* the specified special debug level is active.
|
||||
* Automatically appends a newline.
|
||||
*
|
||||
* @see enableDebugChannel
|
||||
*/
|
||||
void debugC(uint32 debugChannels, const char *s, ...) GCC_PRINTF(2, 3);
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user