mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 06:53:59 +00:00
Added platform specific getJNIVersion implementations
This commit is contained in:
parent
100dfa86a6
commit
8b0b1b8b63
9 changed files with 29 additions and 11 deletions
|
|
@ -39,9 +39,6 @@ package org.lwjgl;
|
|||
* $Id$
|
||||
*/
|
||||
abstract class DefaultSysImplementation implements SysImplementation {
|
||||
/** Included to let native have easy access to Sys.JNI_VERSION */
|
||||
private final static int JNI_VERSION = Sys.JNI_VERSION;
|
||||
|
||||
public native int getJNIVersion();
|
||||
public native void setDebug(boolean debug);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,12 +39,14 @@ package org.lwjgl;
|
|||
* $Id$
|
||||
*/
|
||||
final class LinuxSysImplementation extends J2SESysImplementation {
|
||||
private final static int JNI_VERSION = 16;
|
||||
|
||||
static {
|
||||
java.awt.Toolkit.getDefaultToolkit(); // This will make sure libjawt.so is loaded
|
||||
}
|
||||
|
||||
public int getRequiredJNIVersion() {
|
||||
return 16;
|
||||
return JNI_VERSION;
|
||||
}
|
||||
|
||||
public boolean openURL(final String url) {
|
||||
|
|
|
|||
|
|
@ -45,13 +45,15 @@ import com.apple.eio.FileManager;
|
|||
* $Id$
|
||||
*/
|
||||
final class MacOSXSysImplementation extends J2SESysImplementation {
|
||||
private final static int JNI_VERSION = 16;
|
||||
|
||||
static {
|
||||
// Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3
|
||||
Toolkit.getDefaultToolkit();
|
||||
}
|
||||
|
||||
public int getRequiredJNIVersion() {
|
||||
return 16;
|
||||
return JNI_VERSION;
|
||||
}
|
||||
|
||||
public boolean openURL(String url) {
|
||||
|
|
|
|||
|
|
@ -39,12 +39,14 @@ package org.lwjgl;
|
|||
* $Id$
|
||||
*/
|
||||
final class WindowsSysImplementation extends DefaultSysImplementation {
|
||||
private final static int JNI_VERSION = 16;
|
||||
|
||||
static {
|
||||
Sys.initialize();
|
||||
}
|
||||
|
||||
public int getRequiredJNIVersion() {
|
||||
return 16;
|
||||
return JNI_VERSION;
|
||||
}
|
||||
|
||||
public long getTimerResolution() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue