diff --git a/DDrawCompat/DDrawLog.cpp b/DDrawCompat/DDrawLog.cpp index cbdc7d1..06e29df 100644 --- a/DDrawCompat/DDrawLog.cpp +++ b/DDrawCompat/DDrawLog.cpp @@ -1,5 +1,6 @@ #define WIN32_LEAN_AND_MEAN +#include #include #include "DDrawLog.h" @@ -15,6 +16,12 @@ namespace } } +std::ostream& operator<<(std::ostream& os, const WCHAR* wstr) +{ + CStringA str(wstr); + return os << '"' << static_cast(str) << '"'; +} + std::ostream& operator<<(std::ostream& os, const RECT& rect) { return os << "R(" << rect.left << ',' << rect.top << ',' << rect.right << ',' << rect.bottom << ')'; diff --git a/DDrawCompat/DDrawLog.h b/DDrawCompat/DDrawLog.h index 630838a..7e68ad3 100644 --- a/DDrawCompat/DDrawLog.h +++ b/DDrawCompat/DDrawLog.h @@ -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);