[chocolate-doom] 01/42: Make sure loading disk is only shown if the display is initialised
Jonathan Dowland
jmtd at moszumanska.debian.org
Mon Jan 30 15:06:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
jmtd pushed a commit to annotated tag chocolate-doom-0.1.0
in repository chocolate-doom.
commit 8f20863e40e5f721adc616817eae8442898b9a70
Author: Simon Howard <fraggle at gmail.com>
Date: Sun Oct 2 03:03:40 2005 +0000
Make sure loading disk is only shown if the display is initialised
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 145
---
src/i_video.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/i_video.c b/src/i_video.c
index d89c856..c811ac3 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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git
More information about the Pkg-games-commits
mailing list