From 78d92b6443c9817d3b4c35738948109e1aee769e Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 27 Feb 2007 19:30:54 +0000 Subject: 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 --- .../com/sun/opengl/impl/FunctionAvailabilityCache.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/classes/com/sun/opengl/impl/FunctionAvailabilityCache.java') 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 } - -- cgit v1.2.3