Skip to content

Commit a6eed49

Browse files
committed
hopefully fix win console
1 parent 58d104f commit a6eed49

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

game/platform.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ void Platform::initWindowsConsole() {
120120
freopen_s(&ptr, "NUL", "w", stderr);
121121
}
122122
else {
123-
freopen_s ((FILE**)stdout, "CONOUT$", "w", stdout);
124-
freopen_s ((FILE**)stderr, "CONOUT$", "w", stderr);
123+
freopen_s((FILE**)stdout, "CONOUT$", "w", stdout);
124+
freopen_s((FILE**)stderr, "CONOUT$", "w", stderr);
125+
std::ios::sync_with_stdio(true);
125126
}
126127
stderr_fd = fileno(stderr);
127128
}

0 commit comments

Comments
 (0)