diff options
| author | Mai <mai.iam2048@gmail.com> | 2023-12-07 16:48:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-07 16:48:02 -0500 |
| commit | e0f41115612d0d4279c9037f3f79b68e50809052 (patch) | |
| tree | 90d460da7510b251488321efb81f603fc1c7c0ec /Source/Android/jni/AndroidCommon/IDCache.cpp | |
| parent | 3a4cf579ff03d872cb64183923e18e17e9a37de6 (diff) | |
| parent | 4203632c93f4b73c8fd1159272f08ca022063b2b (diff) | |
Merge pull request #11663 from JosJuice/android-config-change-callback
Android: Use config changed callback for tracking recursive scan setting
Diffstat (limited to 'Source/Android/jni/AndroidCommon/IDCache.cpp')
| -rw-r--r-- | Source/Android/jni/AndroidCommon/IDCache.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Android/jni/AndroidCommon/IDCache.cpp b/Source/Android/jni/AndroidCommon/IDCache.cpp index c3bd435af6..a19423d67c 100644 --- a/Source/Android/jni/AndroidCommon/IDCache.cpp +++ b/Source/Android/jni/AndroidCommon/IDCache.cpp @@ -109,6 +109,8 @@ static jclass s_core_device_control_class; static jfieldID s_core_device_control_pointer; static jmethodID s_core_device_control_constructor; +static jmethodID s_runnable_run; + namespace IDCache { JNIEnv* GetEnvForThread() @@ -504,6 +506,11 @@ jmethodID GetCoreDeviceControlConstructor() return s_core_device_control_constructor; } +jmethodID GetRunnableRun() +{ + return s_runnable_run; +} + } // namespace IDCache extern "C" { @@ -709,6 +716,10 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) "(Lorg/dolphinemu/dolphinemu/features/input/model/CoreDevice;J)V"); env->DeleteLocalRef(core_device_control_class); + const jclass runnable_class = env->FindClass("java/lang/Runnable"); + s_runnable_run = env->GetMethodID(runnable_class, "run", "()V"); + env->DeleteLocalRef(runnable_class); + return JNI_VERSION; } |
