mesa: fix formatting of messages printed using _mesa_log
... on BOTH _WIN32 and !_WIN32 Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6443>
This commit is contained in:

committed by
Marge Bot

parent
fd10cb8cfc
commit
88b935bb0c
@@ -86,7 +86,10 @@ output_if_debug(const char *prefixString, const char *outputString,
|
|||||||
* visible, so communicate with the debugger instead */
|
* visible, so communicate with the debugger instead */
|
||||||
{
|
{
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
snprintf(buf, sizeof(buf), "%s: %s%s", prefixString, outputString, newline ? "\n" : "");
|
if (prefixString)
|
||||||
|
snprintf(buf, sizeof(buf), "%s: %s%s", prefixString, outputString, newline ? "\n" : "");
|
||||||
|
else
|
||||||
|
snprintf(buf, sizeof(buf), "%s%s", outputString, newline ? "\n" : "");
|
||||||
OutputDebugStringA(buf);
|
OutputDebugStringA(buf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -399,7 +402,7 @@ _mesa_log(const char *fmtString, ...)
|
|||||||
va_start(args, fmtString);
|
va_start(args, fmtString);
|
||||||
vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
|
vsnprintf(s, MAX_DEBUG_MESSAGE_LENGTH, fmtString, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
output_if_debug("", s, GL_FALSE);
|
output_if_debug(NULL, s, GL_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user