summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2007-02-27 19:30:54 +0000
committerKenneth Russel <[email protected]>2007-02-27 19:30:54 +0000
commit78d92b6443c9817d3b4c35738948109e1aee769e (patch)
treea80cecd72a195a670459be8166ff50cd0bc57878
parentc55b662e5e8b359c5bfaa4516ef195d064e36816 (diff)
Fixed issue with parsing of OpenGL version strings pointed out by
TimLambert on javagaming.org forum git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1154 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r--src/classes/com/sun/opengl/impl/FunctionAvailabilityCache.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/classes/com/sun/opengl/impl/FunctionAvailabilityCache.java b/src/classes/com/sun/opengl/impl/FunctionAvailabilityCache.java
index ad4f2dde6..c2392baa9 100644
--- a/src/classes/com/sun/opengl/impl/FunctionAvailabilityCache.java
+++ b/src/classes/com/sun/opengl/impl/FunctionAvailabilityCache.java
@@ -336,10 +336,12 @@ public final class FunctionAvailabilityCache {
if (m.matches()) {
int altMajor = Integer.valueOf(m.group(1)).intValue();
int altMinor = Integer.valueOf(m.group(2)).intValue();
- // Avoid possibly confusing situations by requiring
- // major version to match
- if (altMajor == major &&
- altMinor > minor) {
+ // Avoid possibly confusing situations by putting some
+ // constraints on the upgrades we do to the major and
+ // minor versions
+ if ((altMajor == major && altMinor > minor) ||
+ altMajor == major + 1) {
+ major = altMajor;
minor = altMinor;
}
}
@@ -379,4 +381,3 @@ public final class FunctionAvailabilityCache {
} // end class Version
}
-