summaryrefslogtreecommitdiff
path: root/src/win32.cpp
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2007-02-23 12:56:10 +0000
committerDarkvater <darkvater@openttd.org>2007-02-23 12:56:10 +0000
commit1bbbbeeef19727639d80c9bfe760248d50720bc2 (patch)
tree8281000501fad69bd62fdfaf32ebf1cf2d050a9a /src/win32.cpp
parent6d199fcdb75e40ffdde0e612c301f2e74b901678 (diff)
downloadopenttd-1bbbbeeef19727639d80c9bfe760248d50720bc2.tar.xz
(svn r8860) -Cleanup: some style changes, proper #endif comments, variable initialisation, WINCE ifdef and a vsprintf to vsnprintf change.
Diffstat (limited to 'src/win32.cpp')
-rw-r--r--src/win32.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/win32.cpp b/src/win32.cpp
index 5279f64e9..dceda5e86 100644
--- a/src/win32.cpp
+++ b/src/win32.cpp
@@ -868,12 +868,12 @@ void ShowInfo(const char *str)
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 @@ int APIENTRY _tWinMain
#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';