mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-04 22:17:59 +00:00
Windows: Add System.loadLibrary("jawt") again, since it seems that Toolkit.getDefaultToolkit() is not always enough.
This commit is contained in:
parent
c5b91e0f40
commit
b9c965ff0b
1 changed files with 14 additions and 0 deletions
|
|
@ -38,6 +38,7 @@ import java.security.PrivilegedAction;
|
|||
import java.security.AccessController;
|
||||
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.LWJGLUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -49,6 +50,19 @@ final class Win32CanvasImplementation implements AWTCanvasImplementation {
|
|||
static {
|
||||
// Make sure the awt stuff is properly initialised (the jawt library in particular)
|
||||
Toolkit.getDefaultToolkit();
|
||||
AccessController.doPrivileged(new PrivilegedAction() {
|
||||
public Object run() {
|
||||
try {
|
||||
System.loadLibrary("jawt");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
/* It is probably already loaded, potentially by a different ClassLoader
|
||||
* so just log the exception and continue
|
||||
*/
|
||||
LWJGLUtil.log("Failed to load jawt: " + e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public PeerInfo createPeerInfo(AWTGLCanvas canvas, PixelFormat pixel_format) throws LWJGLException {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue