From 35493a49b4404bd358441d3a844eabcaafc5ccb9 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Thu, 9 Feb 2012 16:56:24 +0000 Subject: [PATCH] Print the version number in the window title --- CHANGELOG | 1 + src/sdl/refresh.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 1bb79dd4..1c8e9f1e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ Quake II 4.02 to 4.03 the configuration file and savegames. (reported by Richard Allen) - Fix gl_ext_multitexture set to 1 (reported by Richard Allen and Lukas Sabota) +- Print the version number in the window title. Quake II 4.01 to 4.02 - Fix a linker problem manifesting only on Ubuntu. diff --git a/src/sdl/refresh.c b/src/sdl/refresh.c index 28297fd9..f6cfd780 100644 --- a/src/sdl/refresh.c +++ b/src/sdl/refresh.c @@ -145,6 +145,7 @@ static qboolean GLimp_InitGraphics( qboolean fullscreen ) int counter = 0; int flags; int stencil_bits; + char title[24]; if (surface && (surface->w == vid.width) && (surface->h == vid.height)) { @@ -253,7 +254,8 @@ static qboolean GLimp_InitGraphics( qboolean fullscreen ) } /* Window title */ - SDL_WM_SetCaption("Yamagi Quake II", "Yamagi Quake II"); + snprintf(title, sizeof(title), "Yamagi Quake II v%4.2f", VERSION); + SDL_WM_SetCaption(title, title); /* No cursor */ SDL_ShowCursor(0);