From a0f01116845508deff956b306f7854b829dd2026 Mon Sep 17 00:00:00 2001 From: Carsten Weisse Date: Wed, 14 Feb 2007 19:50:48 +0000 Subject: a better display mode selection (can handle strange frequencies) --- src/jake2/render/opengl/LwjglDriver.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3