Clear the screen on startup

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 49
This commit is contained in:
Simon Howard 2005-08-07 20:01:00 +00:00
parent 0ff16d8ff1
commit bc38703ac6

View file

@ -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];