浏览代码

emscripten: log to stdout instead of stderr.

legacy
Sam Hocevar 5 年前
父节点
当前提交
acb4624084
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      src/base/log.cpp

+ 4
- 0
src/base/log.cpp 查看文件

@@ -113,6 +113,10 @@ void msg::helper(MessageType type, char const *fmt, va_list ap)
widechar.resize(buf.length() + 1);
MultiByteToWideChar(CP_UTF8, 0, buf.c_str(), (int)buf.length() + 1, widechar.data(), widechar.count());
OutputDebugStringW(widechar.data());
# elif defined __EMSCRIPTEN__
fprintf(stdout, "%s: ", prefix[(int)type]);
vfprintf(stdout, fmt, ap);
fflush(stdout);
# else
fprintf(stderr, "%s: ", prefix[(int)type]);
vfprintf(stderr, fmt, ap);


正在加载...
取消
保存