Add extra checks so CALayer's only run on OS X 10.6+, Bump OS X native version
This commit is contained in:
parent
213aa4262d
commit
0e6d20e1e4
|
@ -42,7 +42,7 @@ import com.apple.eio.FileManager;
|
|||
* $Id$
|
||||
*/
|
||||
final class MacOSXSysImplementation extends J2SESysImplementation {
|
||||
private static final int JNI_VERSION = 22;
|
||||
private static final int JNI_VERSION = 23;
|
||||
|
||||
static {
|
||||
// Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3
|
||||
|
|
|
@ -83,7 +83,7 @@ final class AWTSurfaceLock {
|
|||
// due to performance..
|
||||
|
||||
// Allow the use of a Core Animation Layer only when using non fullscreen Display.setParent() or AWTGLCanvas
|
||||
final boolean allowCALayer = ((Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas) && isApplet(component);
|
||||
final boolean allowCALayer = ((Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas) && isApplet(component) && LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 6);
|
||||
|
||||
if (firstLockSucceeded)
|
||||
return lockAndInitHandle(lock_buffer, component, allowCALayer);
|
||||
|
|
|
@ -35,6 +35,7 @@ import java.awt.Canvas;
|
|||
import java.nio.ByteBuffer;
|
||||
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.LWJGLUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -51,7 +52,7 @@ abstract class MacOSXCanvasPeerInfo extends MacOSXPeerInfo {
|
|||
|
||||
protected void initHandle(Canvas component) throws LWJGLException {
|
||||
// Allow the use of a Core Animation Layer only when using non fullscreen Display.setParent() or AWTGLCanvas
|
||||
final boolean allowCALayer = ((Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas) && awt_surface.isApplet(component);
|
||||
final boolean allowCALayer = ((Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas) && awt_surface.isApplet(component) && LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 6);
|
||||
|
||||
nInitHandle(awt_surface.lockAndGetHandle(component), getHandle(), allowCALayer);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue