1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Added logging of wide-character string parameters

This commit is contained in:
narzoul 2016-01-23 17:00:29 +01:00
parent a573c1344c
commit 14d28fe7ac
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,6 @@
#define WIN32_LEAN_AND_MEAN
#include <atlstr.h>
#include <Windows.h>
#include "DDrawLog.h"
@ -15,6 +16,12 @@ namespace
}
}
std::ostream& operator<<(std::ostream& os, const WCHAR* wstr)
{
CStringA str(wstr);
return os << '"' << static_cast<const char*>(str) << '"';
}
std::ostream& operator<<(std::ostream& os, const RECT& rect)
{
return os << "R(" << rect.left << ',' << rect.top << ',' << rect.right << ',' << rect.bottom << ')';

View File

@ -14,6 +14,7 @@
isAlreadyLogged##__LINE__ = true; \
}
std::ostream& operator<<(std::ostream& os, const WCHAR* wstr);
std::ostream& operator<<(std::ostream& os, const RECT& rect);
std::ostream& operator<<(std::ostream& os, const DDSCAPS& caps);
std::ostream& operator<<(std::ostream& os, const DDSCAPS2& caps);