summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/i_video.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/i_video.c b/src/i_video.c
index d89c8561..c811ac32 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: i_video.c 140 2005-09-27 22:33:42Z fraggle $
+// $Id: i_video.c 145 2005-10-02 03:03:40Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.34 2005/10/02 03:03:40 fraggle
+// Make sure loading disk is only shown if the display is initialised
+//
// Revision 1.33 2005/09/27 22:33:42 fraggle
// Always use SDL_Flip to update the screen. Fixes problems in Windows when
// running fullscreen, introduced by fixes to the disk icon code.
@@ -141,7 +144,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: i_video.c 140 2005-09-27 22:33:42Z fraggle $";
+rcsid[] = "$Id: i_video.c 145 2005-10-02 03:03:40Z fraggle $";
#include <SDL.h>
#include <ctype.h>
@@ -172,6 +175,10 @@ static boolean palette_to_set;
static int windowwidth, windowheight;
+// display has been set up?
+
+static boolean initialised = false;
+
// if true, screens[0] is screen->pixel
static boolean native_surface;
@@ -371,6 +378,8 @@ void I_ShutdownGraphics(void)
SDL_WM_GrabInput(SDL_GRAB_OFF);
SDL_QuitSubSystem(SDL_INIT_VIDEO);
+
+ initialised = false;
}
@@ -602,7 +611,7 @@ void I_BeginRead(void)
{
int y;
- if (disk_image == NULL)
+ if (!initialised || disk_image == NULL)
return;
// save background and copy the disk image in
@@ -628,7 +637,7 @@ void I_EndRead(void)
{
int y;
- if (disk_image == NULL)
+ if (!initialised || disk_image == NULL)
return;
// save background and copy the disk image in
@@ -657,6 +666,9 @@ void I_FinishUpdate (void)
int i;
// UNUSED static unsigned char *bigscreen=0;
+ if (!initialised)
+ return;
+
UpdateGrab();
// Don't update the screen if the window isn't visible.
@@ -870,5 +882,7 @@ void I_InitGraphics(void)
// clear out any events waiting at the start
while (SDL_PollEvent(&dummy));
+
+ initialised = true;
}