Redirect libTIFF errors and Warnings

This commit is contained in:
Thomas Bernard
2019-01-04 21:25:13 +01:00
parent addf8d9798
commit 40dd718dd1
2 changed files with 41 additions and 11 deletions

View File

@@ -41,15 +41,6 @@ extern void GFX2_Log(GFX2_Log_priority_T priority, const char * fmt, ...)
va_start(ap, fmt);
GFX2_LogV(priority, fmt, ap);
va_end(ap);
#if defined(_MSC_VER) && defined(_DEBUG)
{
char message[1024];
va_start(ap, fmt);
vsnprintf(message, sizeof(message), fmt, ap);
va_end(ap);
OutputDebugStringA(message);
}
#endif
}
extern void GFX2_LogV(GFX2_Log_priority_T priority, const char * fmt, va_list ap)
@@ -83,6 +74,13 @@ extern void GFX2_LogV(GFX2_Log_priority_T priority, const char * fmt, va_list ap
#else
vfprintf((unsigned)priority >= GFX2_INFO ? stdout : stderr, fmt, ap);
#endif
#if defined(_MSC_VER) && defined(_DEBUG)
{
char message[1024];
vsnprintf(message, sizeof(message), fmt, ap);
OutputDebugStringA(message);
}
#endif
}
extern void GFX2_LogHexDump(GFX2_Log_priority_T priority, const char * header, const byte * data, long offset, long count)