aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2007-02-14 19:50:48 +0000
committerCarsten Weisse <[email protected]>2007-02-14 19:50:48 +0000
commita0f01116845508deff956b306f7854b829dd2026 (patch)
treeac96c349b5630deadb6d60810dbcadb52db66120 /src/jake2/render
parent6a91ae18ab240d260fa90768ef48c41707a5877f (diff)
a better display mode selection (can handle strange frequencies)
Diffstat (limited to 'src/jake2/render')
-rw-r--r--src/jake2/render/opengl/LwjglDriver.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jake2/render/opengl/LwjglDriver.java b/src/jake2/render/opengl/LwjglDriver.java
index c1084a7..c4c898a 100644
--- a/src/jake2/render/opengl/LwjglDriver.java
+++ b/src/jake2/render/opengl/LwjglDriver.java
@@ -2,7 +2,7 @@
* LWJGLBase.java
* Copyright (C) 2004
*
- * $Id: LwjglDriver.java,v 1.3 2006-11-22 15:05:39 cawe Exp $
+ * $Id: LwjglDriver.java,v 1.4 2007-02-14 19:50:48 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -122,10 +122,12 @@ public abstract class LwjglDriver extends LwjglGL implements GLDriver {
if (m.getBitsPerPixel() != oldDisplayMode.getBitsPerPixel())
continue;
- if (m.getFrequency() > oldDisplayMode.getFrequency())
+ if (m.getFrequency() > Math.max(60, oldDisplayMode.getFrequency()))
continue;
if (m.getHeight() < 240 || m.getWidth() < 320)
continue;
+ if (m.getHeight() > oldDisplayMode.getHeight() || m.getWidth() > oldDisplayMode.getWidth())
+ continue;
int j = 0;
DisplayMode ml = null;