Changeset - r6265:05ea4f089b8d
[Not reviewed]
master
0 1 0
glx - 17 years ago 2007-03-09 00:15:43
glx@openttd.org
(svn r9074) -Codechange: win32 dedicated console now doesn't need an extra 'enter' to fully quit
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/video/dedicated_v.cpp
Show inline comments
 
@@ -76,8 +76,10 @@ static char _win_console_thread_buffer[2
 
/* 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);
0 comments (0 inline, 0 general)