From 1dd9383371cc2c033fe865e1e71410e62cc2057f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 18 Mar 2014 22:49:29 -0700 Subject: [PATCH] Debug output to stdout. --- include/bx/debug.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/bx/debug.h b/include/bx/debug.h index f3b7018..2f58bbd 100644 --- a/include/bx/debug.h +++ b/include/bx/debug.h @@ -19,6 +19,8 @@ extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char* _ # include extern "C" void NSLog(CFStringRef _format, ...); # endif // defined(__OBJC__) +#elif 0 // BX_PLATFORM_EMSCRIPTEN +# include #else # include #endif // BX_PLATFORM_WINDOWS @@ -53,9 +55,11 @@ namespace bx # else NSLog(__CFStringMakeConstantString("%s"), _out); # endif // defined(__OBJC__) +#elif 0 // BX_PLATFORM_EMSCRIPTEN + emscripten_log(EM_LOG_CONSOLE, "%s", _out); #else - fputs(_out, stderr); - fflush(stderr); + fputs(_out, stdout); + fflush(stdout); #endif // BX_PLATFORM_ }