changeset 902:772f9f1b09cb draft

(svn r1388) Feature: [SDL] Show revision number in window title
author dominik <dominik@openttd.org>
date Wed, 05 Jan 2005 14:20:23 +0000
parents cb610cd5cbf0
children 81a2e3172b5a
files sdl.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sdl.c
+++ b/sdl.c
@@ -319,9 +319,12 @@
 	return 2;
 }
 
+extern const char _openttd_revision[];
+
 static bool CreateMainSurface(int w, int h)
 {
 	SDL_Surface *newscreen;
+	char *caption;
 
 	GetAvailableVideoMode(&w, &h);
 
@@ -339,7 +342,8 @@
 	_sdl_screen = newscreen;
 	InitPalette();
 
-	SDL_CALL SDL_WM_SetCaption("OpenTTD", "OpenTTD");
+	caption = str_fmt("OpenTTD %s", _openttd_revision);
+	SDL_CALL SDL_WM_SetCaption(caption, caption);
 	SDL_CALL SDL_ShowCursor(0);
 
 	GameSizeChanged();