summaryrefslogtreecommitdiff
path: root/win32.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-14 20:27:00 +0000
committertruelight <truelight@openttd.org>2004-12-14 20:27:00 +0000
commitb6c74c1c2077ce0c4dcd525890ea739a807f1508 (patch)
tree414a017a79ae9c8b05c4483bd6e6130f2b814562 /win32.c
parent52aeaebde0f813375a5b08425fe522ffe1cc55c0 (diff)
downloadopenttd-b6c74c1c2077ce0c4dcd525890ea739a807f1508.tar.xz
(svn r1090) -Fix: Made the _openttd_revision variable global, and with that
hopefully killed the windows-revision problem. If WITH_REV is defined, for both Windows as *nix system _openttd_revision is filled with normal info, else _openttd_revision is set to 'norev000' -Fix: Small possible server-crash
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/win32.c b/win32.c
index 2f82559a0..7177d72a8 100644
--- a/win32.c
+++ b/win32.c
@@ -15,6 +15,11 @@
#define SMART_PALETTE_ANIM
+/* Declare the revision tag for Windows */
+#ifdef WITH_REV_HACK
+ const char _openttd_revision[] = WITH_REV_HACK;
+#endif
+
static struct {
HWND main_wnd;
HBITMAP dib_sect;
@@ -499,9 +504,8 @@ static void MakeWindow(bool full_screen)
SetWindowPos(_wnd.main_wnd, 0, x, y, w, h, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER);
} else {
char Windowtitle[50] = "OpenTTD ";
- #ifdef WITH_REV_HACK
+ #ifdef WITH_REV
// also show revision number/release in window title
- extern const char _openttd_revision[];
strncat(Windowtitle, _openttd_revision, sizeof(Windowtitle)-(strlen(Windowtitle) + 1));
#endif
_wnd.main_wnd = CreateWindow("TTD", Windowtitle, style, x, y, w, h, 0, 0, _inst, 0);