From 42a0b6c86c65c91bbdb598e640996a8961899fa5 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Thu, 16 Jun 2005 23:02:03 +0000 Subject: Fixed problem with fullscreen display mode selection on Linux with JDK 1.6 git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@92 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/util/ScreenResSelector.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/demos') diff --git a/src/demos/util/ScreenResSelector.java b/src/demos/util/ScreenResSelector.java index 7b83ff6..07df833 100755 --- a/src/demos/util/ScreenResSelector.java +++ b/src/demos/util/ScreenResSelector.java @@ -62,7 +62,8 @@ public class ScreenResSelector { // Filter everything that is not at least 24-bit modes = filterDisplayModes(modes, new DisplayModeFilter() { public boolean filter(DisplayMode mode) { - return (mode.getBitDepth() >= 24); + // Bit depth < 0 means "multi-depth" -- can't reason about it + return (mode.getBitDepth() < 0 || mode.getBitDepth() >= 24); } }); // Filter everything less than 640x480 @@ -125,7 +126,7 @@ public class ScreenResSelector { } private static String modeToString(DisplayMode mode) { - return (mode.getBitDepth() + " bits, " + + return (((mode.getBitDepth() > 0) ? (mode.getBitDepth() + " bits, ") : "") + mode.getWidth() + "x" + mode.getHeight() + ", " + mode.getRefreshRate() + " Hz"); } -- cgit v1.2.3