Advertisement
Guest User

Untitled

a guest
Mar 8th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. void console::write(const u32string& str)
  2. {
  3. lock_guard<mutex> guard(lock);
  4. #ifdef _WIN32
  5. wstring wstr = encoding::u32_to_u16(str) + L"\n";
  6. WriteConsoleW(ouputHandle, wstr.c_str(), wstr.size(), NULL, NULL);
  7. OutputDebugStringW(wstr.c_str());
  8. #else
  9. cout << encoding::u32_to_u8(str) << endl;
  10. #endif
  11. log(str, log_type::info);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement