summaryrefslogtreecommitdiff
path: root/win32.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-09-07 22:36:33 +0000
committerDarkvater <darkvater@openttd.org>2006-09-07 22:36:33 +0000
commit87761ab2d9d0c1cc4ae50c803e33ec2c4bc7141b (patch)
treef720222e2a164ac3f2dd2ee7e4e038a387d393f4 /win32.c
parent67e9294b22fde227201659a8d48fefa3dcc0293d (diff)
downloadopenttd-87761ab2d9d0c1cc4ae50c803e33ec2c4bc7141b.tar.xz
(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.
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/win32.c b/win32.c
index 9119aed37..4070f8546 100644
--- a/win32.c
+++ b/win32.c
@@ -786,27 +786,16 @@ static int ParseCommandLine(char *line, char **argv, int max_argc)
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);