Windows: replace loadLibrary("jawt") with Toolkit.getDefaultToolkit() which is better and avoids classloader issues with multiple loaded natives. Additionally, getDefaultToolkit is not a privileged action, while loadLibrary is.
This commit is contained in:
parent
1a0dde001c
commit
8ee5b8d931
|
@ -33,6 +33,7 @@ package org.lwjgl.opengl;
|
|||
|
||||
import java.awt.GraphicsConfiguration;
|
||||
import java.awt.GraphicsDevice;
|
||||
import java.awt.Toolkit;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.security.AccessController;
|
||||
|
||||
|
@ -46,12 +47,8 @@ import org.lwjgl.LWJGLException;
|
|||
*/
|
||||
final class Win32CanvasImplementation implements AWTCanvasImplementation {
|
||||
static {
|
||||
AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
System.loadLibrary("jawt");
|
||||
return null;
|
||||
}
|
||||
});
|
||||
// Make sure the awt stuff is properly initialised (the jawt library in particular)
|
||||
Toolkit.getDefaultToolkit();
|
||||
}
|
||||
|
||||
public PeerInfo createPeerInfo(AWTGLCanvas canvas, PixelFormat pixel_format) throws LWJGLException {
|
||||
|
|
Loading…
Reference in New Issue