summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2011-02-03 16:45:21 +0300
committerAndrey Nazarov <skuller@skuller.net>2011-02-04 20:57:30 +0300
commite93157bfc552f28fa53ff8d7220d9b2d141bfb85 (patch)
tree3d52c62fb0a0149f78c4ddb1b536afec00624f54 /src
parenta3b735cc386f4de6bcbb46724363aa40e094e456 (diff)
Clamp video width/height in software renderer.
Fix MAXHEIGHT definition in assembler code.
Diffstat (limited to 'src')
-rw-r--r--src/i386/d_ifacea.h2
-rw-r--r--src/sw_main.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/i386/d_ifacea.h b/src/i386/d_ifacea.h
index 7c361e1..74e13f8 100644
--- a/src/i386/d_ifacea.h
+++ b/src/i386/d_ifacea.h
@@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define CYCLE 128
// !!! if this is changed, it must be changed in r_shared.h too !!!
-#define MAXHEIGHT 1300
+#define MAXHEIGHT 1200
// !!! if this is changed, it must be changed in quakedef.h too !!!
#define CACHE_SIZE 32 // used to align key data structures
diff --git a/src/sw_main.c b/src/sw_main.c
index 5ceb96f..938e5fa 100644
--- a/src/sw_main.c
+++ b/src/sw_main.c
@@ -229,8 +229,8 @@ void R_UnRegister (void)
}
void R_ModeChanged( int width, int height, int flags, int rowbytes, void *pixels ) {
- vid.width = width;
- vid.height = height;
+ vid.width = width > MAXWIDTH ? MAXWIDTH : width;
+ vid.height = height > MAXHEIGHT ? MAXHEIGHT : height;
vid.buffer = pixels;
vid.rowbytes = rowbytes;