From 6c02f54a4612b6ab9155e35cf1a6149f9344f02f Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 18 May 2006 06:22:51 +0000 Subject: [PATCH] Prettier Win32-debug of keyboard input. --- src/conio/win32cio.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/conio/win32cio.c b/src/conio/win32cio.c index ed54b4acfd..d63693c946 100644 --- a/src/conio/win32cio.c +++ b/src/conio/win32cio.c @@ -163,6 +163,16 @@ static int ypos=1; static int currattr=7; static int modeidx=3; +#if defined(_DEBUG) +static void dputs(const char* str) +{ + char msg[1024]; + + SAFEPRINTF(msg,"%s\r\n",str); + OutputDebugString(msg); +} +#endif + static void dprintf(const char* fmt, ...) { #if defined(_DEBUG) @@ -173,7 +183,7 @@ static void dprintf(const char* fmt, ...) vsnprintf(sbuf,sizeof(sbuf),fmt,argptr); sbuf[sizeof(sbuf)-1]=0; va_end(argptr); - OutputDebugString(sbuf); + dputs(sbuf); #endif /* _DEBUG */ } -- GitLab