forked from bartvdbraak/blender
CLOG: Add getter to know if output supports coloring
This commit is contained in:
parent
b37c40a575
commit
e856443c99
@ -150,6 +150,8 @@ void CLG_level_set(int level);
|
||||
|
||||
void CLG_logref_init(CLG_LogRef *clg_ref);
|
||||
|
||||
int CLG_color_support_get(CLG_LogRef *clg_ref);
|
||||
|
||||
/** Declare outside function, declare as extern in header. */
|
||||
#define CLG_LOGREF_DECLARE_GLOBAL(var, id) \
|
||||
static CLG_LogRef _static_##var = {id}; \
|
||||
|
@ -755,4 +755,12 @@ void CLG_logref_init(CLG_LogRef *clg_ref)
|
||||
#endif
|
||||
}
|
||||
|
||||
int CLG_color_support_get(CLG_LogRef *clg_ref)
|
||||
{
|
||||
if (clg_ref->type == NULL) {
|
||||
CLG_logref_init(clg_ref);
|
||||
}
|
||||
return clg_ref->type->ctx->use_color;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
Loading…
Reference in New Issue
Block a user