hedgewars/CCHandlers.inc
changeset 2800 f286d91157b8
parent 2786 85f6425a4d74
child 2808 8f48b538d591
--- a/hedgewars/CCHandlers.inc	Wed Feb 10 22:00:49 2010 +0000
+++ b/hedgewars/CCHandlers.inc	Fri Feb 12 16:39:22 2010 +0000
@@ -613,6 +613,7 @@
 
 procedure chFullScr(var s: shortstring);
 var flags: Longword = 0;
+	ico: PSDL_Surface;
 {$IFDEF DEBUGFILE}
     buf: array[byte] of char;
 {$ENDIF}
@@ -636,7 +637,17 @@
 		cScreenHeight:= cInitHeight
 	end;
 
+	// load window icon
+	ico:= LoadImage(Pathz[ptGraphics] + '/hwengine', ifIgnoreCaps);
+	if ico <> nil then
+		begin
+		SDL_WM_SetIcon(ico, 0);
+		SDL_FreeSurface(ico)
+		end;
+	
+	// set window caption
 	SDL_WM_SetCaption('Hedgewars', nil);
+	
 	if SDLPrimSurface <> nil then
 	begin
 {$IFDEF DEBUGFILE}