From 8f72d6f82caf7ac0de7c969d665213802db7fdbd Mon Sep 17 00:00:00 2001 From: Ludvig Strigeus Date: Thu, 11 Oct 2001 11:49:51 +0000 Subject: Determine caption from file name. svn-id: r3425 --- sdl.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sdl.cpp') diff --git a/sdl.cpp b/sdl.cpp index 068494a6b5..65e59df60d 100644 --- a/sdl.cpp +++ b/sdl.cpp @@ -17,6 +17,9 @@ * * Change Log: * $Log$ + * Revision 1.7 2001/10/11 11:49:51 strigeus + * Determine caption from file name. + * * Revision 1.6 2001/10/11 10:15:58 strigeus * no SDL cursor * @@ -311,7 +314,12 @@ void initGraphics(Scumm *s) { /* Clean up on exit */ atexit(SDL_Quit); - SDL_WM_SetCaption("ScummVM - Monkey Island 2: LeChuck's revenge","ScummVM - Monkey Island 2: LeChuck's revenge"); + char buf[512], *gameName; + + sprintf(buf, "ScummVM - %s", gameName = s->getGameName()); + free(gameName); + + SDL_WM_SetCaption(buf,buf); SDL_ShowCursor(SDL_DISABLE); #if !defined(SCALEUP_2x2) -- cgit v1.2.3