Index: runtime/bin/stdin_win.cc |
diff --git a/runtime/bin/stdin_win.cc b/runtime/bin/stdin_win.cc |
index e1d036e58318b7f9408c6ab2e90a134827837611..44e517de7a87d4440c80cb63dd06f14c77968a02 100644 |
--- a/runtime/bin/stdin_win.cc |
+++ b/runtime/bin/stdin_win.cc |
@@ -23,6 +23,14 @@ int Stdin::ReadByte() { |
} |
+bool Stdin::GetEchoMode() { |
+ HANDLE h = GetStdHandle(STD_INPUT_HANDLE); |
+ DWORD mode; |
+ if (!GetConsoleMode(h, &mode)) return false; |
+ return (mode & ENABLE_ECHO_INPUT) != 0; |
+} |
+ |
+ |
void Stdin::SetEchoMode(bool enabled) { |
HANDLE h = GetStdHandle(STD_INPUT_HANDLE); |
DWORD mode; |
@@ -36,6 +44,14 @@ void Stdin::SetEchoMode(bool enabled) { |
} |
+bool Stdin::GetLineMode() { |
+ HANDLE h = GetStdHandle(STD_INPUT_HANDLE); |
+ DWORD mode; |
+ if (!GetConsoleMode(h, &mode)) return false; |
+ return (mode & ENABLE_LINE_INPUT) != 0; |
+} |
+ |
+ |
void Stdin::SetLineMode(bool enabled) { |
HANDLE h = GetStdHandle(STD_INPUT_HANDLE); |
DWORD mode; |