diff --git a/ogl_editor/src/rlog.c b/ogl_editor/src/rlog.c index 4e1d8e0..6574278 100644 --- a/ogl_editor/src/rlog.c +++ b/ogl_editor/src/rlog.c @@ -2,6 +2,11 @@ #include #include +#if defined(WIN32) +#define WIN32_LEAN_AND_MEAN +#include +#endif + static int s_log_level = 0; static int s_old_level = 0; @@ -9,14 +14,20 @@ static int s_old_level = 0; void rlog(int logLevel, const char* format, ...) { + char buffer[2048]; va_list ap; if (logLevel < s_log_level) return; va_start(ap, format); - vprintf(format, ap); - va_end(ap); +#if defined(_WIN32) + vsprintf(buffer, format, ap); + OutputDebugStringA(buffer); +#else + vprintf(format, ap); +#endif + va_end(ap); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////