diff --git a/xwords4/wince/ceutil.c b/xwords4/wince/ceutil.c index a43226430..56067f134 100755 --- a/xwords4/wince/ceutil.c +++ b/xwords4/wince/ceutil.c @@ -191,3 +191,14 @@ ceCenterCtl( HWND hDlg, XP_U16 resID ) XP_LOGF( "MoveWindow=>%d", GetLastError() ); } } /* ceCenterCtl */ + +#ifdef DEBUG +void +XP_LOGW( const XP_UCHAR* prefix, const wchar_t* arg ) +{ + XP_UCHAR buf[512]; + (void)WideCharToMultiByte( CP_ACP, 0, arg, -1, + buf, sizeof(buf), NULL, NULL ); + XP_LOGF( "%s: %s", prefix, buf ); +} +#endif diff --git a/xwords4/wince/ceutil.h b/xwords4/wince/ceutil.h index 1a0669b76..3c9131e2e 100755 --- a/xwords4/wince/ceutil.h +++ b/xwords4/wince/ceutil.h @@ -42,4 +42,11 @@ XP_Bool ceGetChecked( HWND hDlg, XP_U16 resID ); void ceSetChecked( HWND hDlg, XP_U16 resID, XP_Bool check ); void ceCenterCtl( HWND hDlg, XP_U16 resID ); + +#ifdef DEBUG +void XP_LOGW( const XP_UCHAR* prefix, const wchar_t* arg ); +#else +# define XP_LOGW( prefix, arg ) +#endif + #endif