util: Increase OutputDebugStringA to 4k.
According to http://unixwiz.net/techtips/outputdebugstring.html that's how big the buffer is. The 512bytes limitation is in kernel mode.
This commit is contained in:
@@ -97,10 +97,8 @@ void _debug_vprintf(const char *format, va_list ap)
|
|||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
}
|
}
|
||||||
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
||||||
/* EngDebugPrint does not handle float point arguments, so we need to use
|
/* OutputDebugStringA can be very slow, so buffer until we find a newline. */
|
||||||
* our own vsnprintf implementation. It is also very slow, so buffer until
|
static char buf[4096] = {'\0'};
|
||||||
* we find a newline. */
|
|
||||||
static char buf[512 + 1] = {'\0'};
|
|
||||||
size_t len = strlen(buf);
|
size_t len = strlen(buf);
|
||||||
int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap);
|
int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap);
|
||||||
if(ret > (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) {
|
if(ret > (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) {
|
||||||
|
Reference in New Issue
Block a user