Mercurial > hg > openttd
diff src/win32.cpp @ 6124:b688d35abaf4 draft
(svn r8860) -Cleanup: some style changes, proper #endif comments, variable initialisation, WINCE ifdef and a vsprintf to vsnprintf change.
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Fri, 23 Feb 2007 12:56:10 +0000 (2007-02-23) |
parents | 6def6ecb1bf7 |
children | 9ac91c745e60 |
line wrap: on
line diff
--- a/src/win32.cpp +++ b/src/win32.cpp @@ -868,12 +868,12 @@ int _set_error_mode(int); #endif -#if defined(WINCE) -int APIENTRY WinMain -#else -int APIENTRY _tWinMain -#endif - (HINSTANCE hInstance, HINSTANCE hPrevInstance, +#if defined(WINCE) && !defined(_tWinMain) +/* GCC crosscompiler for WINCE doesn't support wide version */ +# define _tWinMain WinMain +#endif /* WINCE */ + +int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { int argc; @@ -922,12 +922,11 @@ #if defined(WINCE) void GetCurrentDirectoryW(int length, wchar_t *path) { - wchar_t *pDest = NULL; /* Get the name of this module */ GetModuleFileName(NULL, path, length); /* Remove the executable name, this we call CurrentDir */ - pDest = wcsrchr(path, '\\'); + wchar_t *pDest = wcsrchr(path, '\\'); if (pDest != NULL) { int result = pDest - path + 1; path[result] = '\0';