mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-17 17:42:51 +00:00
Add support to call verbose_printf() without an initialized App::instance().
This commit is contained in:
parent
78d3b80df3
commit
26f637b839
@ -73,6 +73,15 @@ LoggerModule::~LoggerModule()
|
|||||||
|
|
||||||
void verbose_printf(const char *format, ...)
|
void verbose_printf(const char *format, ...)
|
||||||
{
|
{
|
||||||
|
if (!App::instance()) {
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, format);
|
||||||
|
vfprintf(stderr, format, ap);
|
||||||
|
fflush(stderr);
|
||||||
|
va_end(ap);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!App::instance()->getLogger()->isVerbose())
|
if (!App::instance()->getLogger()->isVerbose())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user