Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cocos/base/CCConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ void log(const char * format, ...)
} while (true);
#if CC_TARGET_PLATFORM != CC_PLATFORM_WIN32
buf[nret] = '\n';
#endif
buf[++nret] = '\0';
#else
buf[nret] = '\0';
#endif

#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
__android_log_print(ANDROID_LOG_DEBUG, "cocos2d-x debug info", "%s", buf);
Expand All @@ -190,6 +192,7 @@ void log(const char * format, ...)

MultiByteToWideChar(CP_UTF8, 0, tempBuf, -1, wszBuf, sizeof(wszBuf));
OutputDebugStringW(wszBuf);
OutputDebugStringW(L"\n");
WideCharToMultiByte(CP_ACP, 0, wszBuf, -1, tempBuf, sizeof(tempBuf), nullptr, FALSE);
#if CC_TARGET_PLATFORM != CC_PLATFORM_WIN32
printf("%s", tempBuf);
Expand Down