Mercurial > hg > openttd
changeset 4572:9d022d3e93cd draft
(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.
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Thu, 07 Sep 2006 22:36:33 +0000 |
parents | 2dcc4802b1e9 |
children | 50eaa75f4bf7 |
files | win32.c |
diffstat | 1 files changed, 1 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/win32.c +++ b/win32.c @@ -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);