Set Windows console code page to UTF-8

Refs #6663 comment <https://github.com/Genymobile/scrcpy/pull/6663#issuecomment-3875602219>

Suggested-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
This commit is contained in:
Romain Vimont
2026-02-10 08:27:05 +01:00
parent 2301f64158
commit bb6d1c6348

View File

@@ -151,6 +151,10 @@ sc_sdl_log_print(void *userdata, int category, SDL_LogPriority priority,
void
sc_log_configure(void) {
#ifdef _WIN32
SetConsoleOutputCP(CP_UTF8);
#endif
SDL_SetLogOutputFunction(sc_sdl_log_print, NULL);
// Redirect FFmpeg logs to SDL logs
av_log_set_callback(sc_av_log_callback);