summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2005-01-05 14:20:23 +0000
committerdominik <dominik@openttd.org>2005-01-05 14:20:23 +0000
commit9545f8c19c4d3019b0a27ada504cfe342f8802ce (patch)
tree7343eef0f5331863c6c5fe38204a9257d6123094
parente5129d5b32565438273b3d8e71a5edb267ef1db2 (diff)
downloadopenttd-9545f8c19c4d3019b0a27ada504cfe342f8802ce.tar.xz
(svn r1388) Feature: [SDL] Show revision number in window title
-rw-r--r--sdl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sdl.c b/sdl.c
index c9275f37a..e40056619 100644
--- a/sdl.c
+++ b/sdl.c
@@ -319,9 +319,12 @@ static int GetAvailableVideoMode(int *w, int *h)
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 @@ static bool CreateMainSurface(int w, int h)
_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();