diff options
-rw-r--r-- | src/i_video.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/i_video.c b/src/i_video.c index b41e5e28..c21283b8 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: i_video.c 47 2005-08-07 03:09:33Z fraggle $ +// $Id: i_video.c 49 2005-08-07 20:01:00Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -22,6 +22,9 @@ // 02111-1307, USA. // // $Log$ +// Revision 1.17 2005/08/07 20:01:00 fraggle +// Clear the screen on startup +// // Revision 1.16 2005/08/07 03:09:33 fraggle // Fix gamma correction // @@ -81,7 +84,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: i_video.c 47 2005-08-07 03:09:33Z fraggle $"; +rcsid[] = "$Id: i_video.c 49 2005-08-07 20:01:00Z fraggle $"; #include <ctype.h> #include <SDL.h> @@ -649,6 +652,7 @@ void I_SetPalette (byte *doompalette) void I_InitGraphics(void) { + SDL_Event dummy; int flags = 0; SDL_Init(SDL_INIT_VIDEO); @@ -687,10 +691,13 @@ void I_InitGraphics(void) LoadDiskImage(); - { - SDL_Event dummy; - while (SDL_PollEvent(&dummy)); - } + // start with a clear black screen + + memset(screens[0], 0, SCREENWIDTH * SCREENHEIGHT); + + // clear out any events waiting at the start + + while (SDL_PollEvent(&dummy)); } unsigned exptable[256]; |