File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
#include < jni.h>
6
6
#include < dlfcn.h>
7
- #include < string.h >
7
+ #include < string>
8
8
#include " include/criware.h"
9
9
10
+ #define CURRENT_JNI_VERSION JNI_VERSION_1_6
11
+
10
12
CriWareUnityApi CW_API_OBJECT_NAME = {0 };
11
13
void *g_GenuineLib = nullptr ;
12
14
@@ -18,7 +20,7 @@ JNI_OnLoad(JavaVM *vm, void *reserved) {
18
20
DEBUG_LOG (" On load: lib handle = %p" , g_GenuineLib);
19
21
ResolveFunctions ();
20
22
21
- jint ret = JNI_VERSION_1_1 ;
23
+ jint ret = CURRENT_JNI_VERSION ;
22
24
if (CW_API_OBJECT_NAME.JNI_OnLoad ) {
23
25
ret = CW_API_OBJECT_NAME.JNI_OnLoad (vm, reserved);
24
26
}
@@ -32,7 +34,7 @@ JNI_OnUnload(JavaVM *vm, void *reserved) {
32
34
if (CW_API_OBJECT_NAME.JNI_OnUnload ) {
33
35
CW_API_OBJECT_NAME.JNI_OnUnload (vm, reserved);
34
36
}
35
- memset (&CW_API_OBJECT_NAME, sizeof (CriWareUnityApi), 0 );
37
+ memset (&CW_API_OBJECT_NAME, 0 , sizeof (CriWareUnityApi));
36
38
dlclose (g_GenuineLib);
37
39
}
38
40
}
You can’t perform that action at this time.
0 commit comments