summaryrefslogtreecommitdiff
path: root/win32.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-12-15 00:31:08 +0000
committerdarkvater <darkvater@openttd.org>2004-12-15 00:31:08 +0000
commitc21659ae7e20d7eb0f1f2c5a88ae173f9316fcb3 (patch)
treeabede9dde98130661ade81d3386600bcf406e07b /win32.c
parentbc13fd26d53af184b55baffabb21bc0c290721c6 (diff)
downloadopenttd-c21659ae7e20d7eb0f1f2c5a88ae173f9316fcb3.tar.xz
(svn r1093) -Fix: Hopefully fixed windows revision issues once and for all. Removed globalness of _openttd_revision and put all such ifdefs into one place. If server has a revision only the same revisions can join; if the server has no revision everyone can join. I reckon this should be a server-side option to allow people to join or not to join.
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/win32.c b/win32.c
index 7177d72a8..dd6e76e6b 100644
--- a/win32.c
+++ b/win32.c
@@ -15,11 +15,6 @@
#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;
@@ -446,6 +441,8 @@ static void RegisterWndClass()
}
}
+extern const char _openttd_revision[];
+
static void MakeWindow(bool full_screen)
{
_fullscreen = full_screen;
@@ -504,10 +501,9 @@ 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
- // also show revision number/release in window title
- strncat(Windowtitle, _openttd_revision, sizeof(Windowtitle)-(strlen(Windowtitle) + 1));
- #endif
+ // also show revision number/release in window title
+ strncat(Windowtitle, _openttd_revision, sizeof(Windowtitle)-(strlen(Windowtitle) + 1));
+
_wnd.main_wnd = CreateWindow("TTD", Windowtitle, style, x, y, w, h, 0, 0, _inst, 0);
if (_wnd.main_wnd == NULL)
error("CreateWindow failed");