summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2005-08-07 20:01:00 +0000
committerSimon Howard2005-08-07 20:01:00 +0000
commitbc38703ac6063a7888f538ae7662487fe1e8cb37 (patch)
treec8596bd3819d472e2b254d8953a0a9634d5a1663 /src
parent0ff16d8ff1d13bb7793aa5fbfee6b6a364397a1d (diff)
downloadchocolate-doom-bc38703ac6063a7888f538ae7662487fe1e8cb37.tar.gz
chocolate-doom-bc38703ac6063a7888f538ae7662487fe1e8cb37.tar.bz2
chocolate-doom-bc38703ac6063a7888f538ae7662487fe1e8cb37.zip
Clear the screen on startup
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 49
Diffstat (limited to 'src')
-rw-r--r--src/i_video.c19
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];