diff options
Diffstat (limited to 'Source/Android/jni/AndroidCommon/IDCache.cpp')
| -rw-r--r-- | Source/Android/jni/AndroidCommon/IDCache.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/Android/jni/AndroidCommon/IDCache.cpp b/Source/Android/jni/AndroidCommon/IDCache.cpp index d0a7710e1a..a5a52a4f36 100644 --- a/Source/Android/jni/AndroidCommon/IDCache.cpp +++ b/Source/Android/jni/AndroidCommon/IDCache.cpp @@ -70,6 +70,9 @@ static jclass s_patch_cheat_class; static jfieldID s_patch_cheat_pointer; static jmethodID s_patch_cheat_constructor; +static jclass s_riivolution_patches_class; +static jfieldID s_riivolution_patches_pointer; + namespace IDCache { JNIEnv* GetEnvForThread() @@ -325,6 +328,16 @@ jmethodID GetPatchCheatConstructor() return s_patch_cheat_constructor; } +jclass GetRiivolutionPatchesClass() +{ + return s_riivolution_patches_class; +} + +jfieldID GetRiivolutionPatchesPointer() +{ + return s_riivolution_patches_pointer; +} + } // namespace IDCache extern "C" { @@ -454,6 +467,13 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) s_patch_cheat_constructor = env->GetMethodID(patch_cheat_class, "<init>", "(J)V"); env->DeleteLocalRef(patch_cheat_class); + const jclass riivolution_patches_class = + env->FindClass("org/dolphinemu/dolphinemu/features/riivolution/model/RiivolutionPatches"); + s_riivolution_patches_class = + reinterpret_cast<jclass>(env->NewGlobalRef(riivolution_patches_class)); + s_riivolution_patches_pointer = env->GetFieldID(riivolution_patches_class, "mPointer", "J"); + env->DeleteLocalRef(riivolution_patches_class); + return JNI_VERSION; } @@ -477,5 +497,6 @@ JNIEXPORT void JNI_OnUnload(JavaVM* vm, void* reserved) env->DeleteGlobalRef(s_ar_cheat_class); env->DeleteGlobalRef(s_gecko_cheat_class); env->DeleteGlobalRef(s_patch_cheat_class); + env->DeleteGlobalRef(s_riivolution_patches_class); } } |
