Mercurial > hg > openttd
changeset 6276:6b0bcf707d8d draft
(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.
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Sat, 10 Mar 2007 00:29:20 +0000 |
parents | 95966cefdddc |
children | 4fd731039b1b |
files | src/video/win32_v.cpp src/win32.cpp |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -214,9 +214,6 @@ switch (msg) { case WM_CREATE: SetTimer(hwnd, TID_POLLMOUSE, MOUSE_POLL_DELAY, (TIMERPROC)TrackMouseTimerProc); -#if !defined(UNICODE) - _codepage = GetACP(); // get system codepage as some kind of a default -#endif /* UNICODE */ break; case WM_PAINT: {
--- a/src/win32.cpp +++ b/src/win32.cpp @@ -884,12 +884,16 @@ 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));