mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 22:45:50 +00:00
JNI_VERSION restructure
This commit is contained in:
parent
1e806b9188
commit
fa242848af
2 changed files with 11 additions and 7 deletions
|
|
@ -54,6 +54,9 @@ class ILNative {
|
|||
|
||||
/** Version of IL */
|
||||
public static final String VERSION = "1.0beta3";
|
||||
|
||||
/** Current version of the JNI library */
|
||||
static final int JNI_VERSION = 1;
|
||||
|
||||
private static void loadLibrary(final String lib_name) {
|
||||
AccessController.doPrivileged(new PrivilegedAction() {
|
||||
|
|
@ -74,10 +77,10 @@ class ILNative {
|
|||
loadLibrary(JNI_LIBRARY_NAME);
|
||||
|
||||
// check for mismatch
|
||||
String nativeVersion = getNativeLibraryVersion();
|
||||
if (!nativeVersion.equals(VERSION)) {
|
||||
int nativeVersion = getNativeLibraryVersion();
|
||||
if (nativeVersion != JNI_VERSION) {
|
||||
throw new LinkageError(
|
||||
"Version mismatch: jar version is '" + VERSION +
|
||||
"Version mismatch: jar version is '" + JNI_VERSION +
|
||||
"', native libary version is '" + nativeVersion + "'");
|
||||
}
|
||||
}
|
||||
|
|
@ -88,7 +91,7 @@ class ILNative {
|
|||
static native void resetNativeStubsIL(Class clazz);
|
||||
static native void nCreateIL(String[] ilPaths) throws LWJGLException;
|
||||
static native void nDestroyIL();
|
||||
private static native String getNativeLibraryVersion();
|
||||
private static native int getNativeLibraryVersion();
|
||||
|
||||
static void createIL() throws LWJGLException {
|
||||
String[] illPaths = LWJGLUtil.getLibraryPaths(new String[]{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue