diff options
Diffstat (limited to 'src/classes/com/sun/opengl/impl')
-rw-r--r-- | src/classes/com/sun/opengl/impl/windows/WindowsOnscreenGLDrawable.java | 15 |
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) { |