# HG changeset patch # User Darkvater # Date 1157668593 0 # Node ID e6e17d286de763e9e0befd1ef632327025231778 # Parent 4194aa48c9cd63015c53dbf1651a7f735cf62994 (svn r6421) -Revert r6420: The dedicated server's console actually needs to work. It misses half the input at the moment. Sorry, too hasty commit. diff -r 4194aa48c9cd -r e6e17d286de7 win32.c --- a/win32.c Thu Sep 07 21:52:21 2006 +0000 +++ b/win32.c Thu Sep 07 22:36:33 2006 +0000 @@ -786,27 +786,16 @@ return n; } -#ifndef ATTACH_PARENT_PROCESS -#define ATTACH_PARENT_PROCESS ((DWORD)-1) -#endif - void CreateConsole(void) { HANDLE hand; CONSOLE_SCREEN_BUFFER_INFO coninfo; - BOOL (WINAPI *AttachConsole)(DWORD); if (_has_console) return; _has_console = true; - /* Attach to an existing console if one exists. Unfortunately this function - * only exists on WindowsXP or higher, so for all other users out there: - * you're stuck with an additional console even if you started openttd from - * the command line */ - if (!LoadLibraryList((Function*)&AttachConsole, "kernel32.dll\0AttachConsole\0") || - !AttachConsole(ATTACH_PARENT_PROCESS)) - AllocConsole(); + AllocConsole(); hand = GetStdHandle(STD_OUTPUT_HANDLE); GetConsoleScreenBufferInfo(hand, &coninfo);