summaryrefslogtreecommitdiff
path: root/src/i_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i_video.c')
-rw-r--r--src/i_video.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/i_video.c b/src/i_video.c
index 50c95e95..8e337db6 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: i_video.c 111 2005-09-17 20:50:46Z fraggle $
+// $Id: i_video.c 126 2005-09-24 22:04:03Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.28 2005/09/24 22:04:03 fraggle
+// Add application icon to running program
+//
// Revision 1.27 2005/09/17 20:50:46 fraggle
// Mouse acceleration code to emulate old DOS drivers
//
@@ -121,12 +124,14 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: i_video.c 111 2005-09-17 20:50:46Z fraggle $";
+rcsid[] = "$Id: i_video.c 126 2005-09-24 22:04:03Z fraggle $";
#include <SDL.h>
#include <ctype.h>
#include <math.h>
+#include "chocolate_doom_icon.c"
+
#include "config.h"
#include "doomdef.h"
#include "doomstat.h"
@@ -694,6 +699,25 @@ static void SetCaption(void)
Z_Free(buf);
}
+// Set the application icon
+
+static void SetIcon(void)
+{
+ SDL_Surface *surface;
+
+ surface = SDL_CreateRGBSurfaceFrom(chocolate_doom_data,
+ chocolate_doom_w,
+ chocolate_doom_h,
+ 24,
+ chocolate_doom_w * 3,
+ 0xff << 0,
+ 0xff << 8,
+ 0xff << 16,
+ 0);
+
+ SDL_WM_SetIcon(surface, NULL);
+ SDL_FreeSurface(surface);
+}
void I_InitGraphics(void)
{
@@ -754,6 +778,7 @@ void I_InitGraphics(void)
}
SetCaption();
+ SetIcon();
UpdateFocus();
UpdateGrab();