1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-05 10:49:41 +01:00

Provide error code if SetConsoleOutputCP fails

According to the Win32 documentation, GetLastError provides extended
error information if SetConsoleOutputCP fails.
This commit is contained in:
Misa 2023-10-25 17:21:11 -07:00
parent 98d1a38d7f
commit 791310fa5d

View file

@ -223,7 +223,11 @@ void vlog_open_console(void)
if (!SetConsoleOutputCP(CP_UTF8)) if (!SetConsoleOutputCP(CP_UTF8))
{ {
vlog_warn("Could not set code page for console output to UTF-8."); vlog_warn(
"Could not set code page for console output to UTF-8: "
"SetConsoleOutputCP() failed with %d",
GetLastError()
);
} }
} }
#endif /* _WIN32 */ #endif /* _WIN32 */