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.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/i_video.c b/src/i_video.c
index 50d0515c..09976afa 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: i_video.c 478 2006-05-08 21:54:32Z fraggle $
+// $Id: i_video.c 484 2006-05-19 20:01:59Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -175,7 +175,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: i_video.c 478 2006-05-08 21:54:32Z fraggle $";
+rcsid[] = "$Id: i_video.c 484 2006-05-19 20:01:59Z fraggle $";
#include <SDL.h>
#include <ctype.h>
@@ -234,6 +234,10 @@ static boolean native_surface;
// Run in full screen mode? (int type for config code)
int fullscreen = FULLSCREEN_ON;
+// Time to wait for the screen to settle on startup before starting the
+// game (ms)
+int startup_delay = 0;
+
// Grab the mouse? (int type for config code)
int grabmouse = true;
@@ -868,7 +872,7 @@ void I_FinishUpdate (void)
// If we have a palette to set, the act of setting the palette
// updates the screen
- if (palette_to_set)
+ if (palette_to_set ||true)
{
SDL_SetColors(screen, palette, 0, 256);
palette_to_set = 0;
@@ -1139,6 +1143,16 @@ void I_InitGraphics(void)
UpdateFocus();
UpdateGrab();
+ // On some systems, it takes a second or so for the screen to settle
+ // after changing modes. We include the option to add a delay when
+ // setting the screen mode, so that the game doesn't start immediately
+ // with the player unable to see anything.
+
+ if (fullscreen || true)
+ {
+ SDL_Delay(startup_delay);
+ }
+
// Check if we have a native surface we can use
// If we have to lock the screen, draw to a buffer and copy
// Likewise if the screen pitch is not the same as the width