aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-07 14:21:14 +0800
committercrupest <crupest@outlook.com>2021-06-07 14:21:14 +0800
commitad9a2ad2a3f0488127e3fb618e4b30a40b50f57d (patch)
treed5bd9d53fe399e5fc49684d4f75d9545a81dbfcd
parent6774bcc32ac23728827b36a8c2c2350e811f7940 (diff)
downloadlife-ad9a2ad2a3f0488127e3fb618e4b30a40b50f57d.tar.gz
life-ad9a2ad2a3f0488127e3fb618e4b30a40b50f57d.tar.bz2
life-ad9a2ad2a3f0488127e3fb618e4b30a40b50f57d.zip
...
-rw-r--r--computer-network-experiment/Common.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/computer-network-experiment/Common.cpp b/computer-network-experiment/Common.cpp
index fbdb2c8..5be3971 100644
--- a/computer-network-experiment/Common.cpp
+++ b/computer-network-experiment/Common.cpp
@@ -67,6 +67,12 @@ void BeforeExit() {
int main() {
#ifdef WIN32
+ HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
+ DWORD mode;
+ GetConsoleMode(h, &mode);
+ mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+ SetConsoleMode(h, mode);
+
InitWSA();
#endif