aboutsummaryrefslogtreecommitdiff
path: root/src/win/debug_logger.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/win/debug_logger.hpp')
-rw-r--r--src/win/debug_logger.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/win/debug_logger.hpp b/src/win/debug_logger.hpp
index 53c4859b..c5321828 100644
--- a/src/win/debug_logger.hpp
+++ b/src/win/debug_logger.hpp
@@ -1,6 +1,7 @@
#include "cru/win/win_pre_config.hpp"
#include "cru/common/logger.hpp"
+#include "cru/win/string.hpp"
namespace cru::platform::win {
@@ -14,7 +15,8 @@ class WinDebugLoggerSource : public ::cru::log::ILogSource {
~WinDebugLoggerSource() = default;
void Write(::cru::log::LogLevel level, const std::string_view& s) override {
- ::OutputDebugStringA(s.data());
+ const std::wstring&& ws = ToUtf16String(s);
+ ::OutputDebugStringW(ws.data());
}
};
} // namespace cru::platform::win