diff options
author | glx <glx@openttd.org> | 2007-03-09 00:15:43 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-03-09 00:15:43 +0000 |
commit | 921d4f58cb4d831f53c390f5c7280901ae6b3468 (patch) | |
tree | 09566020119fd89afb7bcd0bc708f501eaaebeff /src | |
parent | b6efe5482daa153d079cd58053f88a8b2b2cca12 (diff) | |
download | openttd-921d4f58cb4d831f53c390f5c7280901ae6b3468.tar.xz |
(svn r9074) -Codechange: win32 dedicated console now doesn't need an extra 'enter' to fully quit
Diffstat (limited to 'src')
-rw-r--r-- | src/video/dedicated_v.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index 268027402..b3e11a118 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -76,8 +76,10 @@ static char _win_console_thread_buffer[200]; /* Windows Console thread. Just loop and signal when input has been received */ static void WINAPI CheckForConsoleInput() { + DWORD nb; + HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE); while (true) { - fgets(_win_console_thread_buffer, lengthof(_win_console_thread_buffer), stdin); + ReadFile(hStdin, _win_console_thread_buffer, lengthof(_win_console_thread_buffer), &nb, NULL); /* Signal input waiting that input is read and wait for it being handled * SignalObjectAndWait() should be used here, but it's unsupported in Win98< */ SetEvent(_hInputReady); |