From 847245350befa73257f49118187693380c4e6857 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Thu, 4 Jun 2015 22:19:50 +0600 Subject: [PATCH] Add debugPrint function for VisualStudio debug output. --- src/Log.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Log.h b/src/Log.h index 9b9d0178..6939a764 100644 --- a/src/Log.h +++ b/src/Log.h @@ -40,4 +40,20 @@ inline void LOG( u16 type, const char * format, ... ) { #endif +#ifdef OS_WINDOWS +#include "windows/GLideN64_Windows.h" +#include + +inline void debugPrint(const char * format, ...) { + char text[256]; + wchar_t wtext[256]; + va_list va; + va_start(va, format); + vsprintf(text, format, va); + mbstowcs(wtext, text, 256); + OutputDebugString(wtext); + va_end(va); +} +#endif + #endif