summaryrefslogtreecommitdiffstats
path: root/src/classes/com
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-11-13 12:39:01 +0000
committerKenneth Russel <[email protected]>2006-11-13 12:39:01 +0000
commit04177b322d62db0a5e55e8c2ec6442cdc7878706 (patch)
treea1996615deca5e748c104d84e98ad20a687cb503 /src/classes/com
parent2f5f80170b4593f7209bfb83c971a689b4278938 (diff)
Fixed Issue 240: Exceptions thrown in GLCapabilitiesChooser don't function properly
Restructured earlier workaround for problems seen on Intel Integrated Graphics chipsets by watching for non-GLExceptions propagated (presumably from user code) and passing them through. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@981 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com')
-rw-r--r--src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLDrawable.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLDrawable.java
index f30b2c4b8..41f959482 100644
--- a/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLDrawable.java
@@ -205,11 +205,18 @@ public class WindowsOnscreenGLDrawable extends WindowsGLDrawable {
// Workaround for problems seen on Intel 82855 cards in particular
// Make it look like the lockSurface() call didn't succeed
unlockSurface();
- if (++setPixelFormatFailCount == MAX_SET_PIXEL_FORMAT_FAIL_COUNT) {
- setPixelFormatFailCount = 0;
- throw e;
+ if (e instanceof GLException) {
+ if (++setPixelFormatFailCount == MAX_SET_PIXEL_FORMAT_FAIL_COUNT) {
+ setPixelFormatFailCount = 0;
+ throw e;
+ }
+ return LOCK_SURFACE_NOT_READY;
+ } else {
+ // Probably a user error in the GLCapabilitiesChooser or similar.
+ // Don't propagate non-GLExceptions out because calling code
+ // expects to catch only that exception type
+ throw new GLException(e);
}
- return LOCK_SURFACE_NOT_READY;
}
}
if (PROFILING) {