summaryrefslogtreecommitdiff
path: root/src/i_video.c
diff options
context:
space:
mode:
authorSimon Howard2005-09-24 23:44:49 +0000
committerSimon Howard2005-09-24 23:44:49 +0000
commit099b0d4b4da03728dd937b683f8b739370f6a667 (patch)
tree52f712e85e851c23dba4d1746a05703b6dc9d234 /src/i_video.c
parent5ed6a965e39051b5b28a33f0fc14045565afc627 (diff)
downloadchocolate-doom-099b0d4b4da03728dd937b683f8b739370f6a667.tar.gz
chocolate-doom-099b0d4b4da03728dd937b683f8b739370f6a667.tar.bz2
chocolate-doom-099b0d4b4da03728dd937b683f8b739370f6a667.zip
Enforce sane screenmultiply values
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 130
Diffstat (limited to 'src/i_video.c')
-rw-r--r--src/i_video.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/i_video.c b/src/i_video.c
index 80d023da..cd569892 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: i_video.c 129 2005-09-24 23:41:07Z fraggle $
+// $Id: i_video.c 130 2005-09-24 23:44:49Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.30 2005/09/24 23:44:49 fraggle
+// Enforce sane screenmultiply values
+//
// Revision 1.29 2005/09/24 23:41:07 fraggle
// Fix "loading" icon for all video modes
//
@@ -127,7 +130,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: i_video.c 129 2005-09-24 23:41:07Z fraggle $";
+rcsid[] = "$Id: i_video.c 130 2005-09-24 23:44:49Z fraggle $";
#include <SDL.h>
#include <ctype.h>
@@ -794,6 +797,11 @@ void I_InitGraphics(void)
screenmultiply = 2;
}
+ if (screenmultiply < 1)
+ screenmultiply = 1;
+ if (screenmultiply > 2)
+ screenmultiply = 2;
+
windowwidth = SCREENWIDTH * screenmultiply;
windowheight = SCREENHEIGHT * screenmultiply;