summaryrefslogtreecommitdiff
path: root/src/win32.cpp
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2007-03-10 00:29:20 +0000
committerDarkvater <darkvater@openttd.org>2007-03-10 00:29:20 +0000
commit86be8991c6d7547229c88170e8928b6539286892 (patch)
tree04c74c4945d94a66b2c3e806f8f447c43e5ab211 /src/win32.cpp
parent3702f987c820cfad0c3075589bb504cccd06e431 (diff)
downloadopenttd-86be8991c6d7547229c88170e8928b6539286892.tar.xz
(svn r9085) -Codechange/Fix: [win32] Move the initialisation of _codepage (non-UNICODE) to winMain as a dedicated server, or different video driver will not have a win32 messageloop.
Diffstat (limited to 'src/win32.cpp')
-rw-r--r--src/win32.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/win32.cpp b/src/win32.cpp
index 232fdc6ad..b31f41d92 100644
--- a/src/win32.cpp
+++ b/src/win32.cpp
@@ -884,12 +884,16 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
char *argv[64]; // max 64 command line arguments
char *cmdline;
+#if !defined(UNICODE)
+ _codepage = GetACP(); // get system codepage as some kind of a default
+#endif /* UNICODE */
+
#if defined(UNICODE)
/* For UNICODE we need to convert the commandline to char* _AND_
* save it because argv[] points into this buffer and thus needs to
* be available between subsequent calls to FS2OTTD() */
char cmdlinebuf[MAX_PATH];
-#endif
+#endif /* UNICODE */
cmdline = WIDE_TO_MB_BUFFER(GetCommandLine(), cmdlinebuf, lengthof(cmdlinebuf));