mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-27 19:34:16 +01:00
Backport review comment from citra-emu/citra#4418
Original reason: As Windows multi-byte character codec is unspecified while we always assume std::string uses UTF-8 in our code base, this can output gibberish when the string contains non-ASCII characters. ::OutputDebugStringW combined with Common::UTF8ToUTF16W is preferred here.
This commit is contained in:
parent
f761e3ef86
commit
eb15711ee6
@ -13,7 +13,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <share.h> // For _SH_DENYWR
|
#include <share.h> // For _SH_DENYWR
|
||||||
#include <windows.h> // For OutputDebugStringA
|
#include <windows.h> // For OutputDebugStringW
|
||||||
#else
|
#else
|
||||||
#define _SH_DENYWR 0
|
#define _SH_DENYWR 0
|
||||||
#endif
|
#endif
|
||||||
@ -148,7 +148,7 @@ void FileBackend::Write(const Entry& entry) {
|
|||||||
|
|
||||||
void DebuggerBackend::Write(const Entry& entry) {
|
void DebuggerBackend::Write(const Entry& entry) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
::OutputDebugStringA(FormatLogMessage(entry).append(1, '\n').c_str());
|
::OutputDebugStringW(Common::UTF8ToUTF16W(FormatLogMessage(entry).append(1, '\n')).c_str());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user