summaryrefslogtreecommitdiffstats
path: root/src/demos/util
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-06-16 23:02:03 +0000
committerKenneth Russel <[email protected]>2005-06-16 23:02:03 +0000
commit42a0b6c86c65c91bbdb598e640996a8961899fa5 (patch)
tree15c1bb90e3d00b873650b7f20cdf652803866a10 /src/demos/util
parentf9d3916e8dc959d709ff048e7164c50ff0094490 (diff)
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
Diffstat (limited to 'src/demos/util')
-rwxr-xr-xsrc/demos/util/ScreenResSelector.java5
1 files changed, 3 insertions, 2 deletions
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");
}