diff options
| author | zackhow <zackhow@gmail.com> | 2019-01-21 19:11:11 -0500 |
|---|---|---|
| committer | zackhow <zackhow@gmail.com> | 2019-01-26 09:38:35 -0500 |
| commit | 4979220cf0103d81023c32498870ecfd35ef473b (patch) | |
| tree | d8359d9d4c542f9a479dc20e699491917b86175a /Source/Core/InputCommon/ControllerInterface/Android/Android.cpp | |
| parent | ff5e29657655b0a423b94575f5766e6a56fc3407 (diff) | |
Android: Optimize rumble call
Moved rumble call to IDCache since GetMethodID is expensive
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Android/Android.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/Android/Android.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp b/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp index 768bdef89c..44dcbf234a 100644 --- a/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp @@ -239,9 +239,7 @@ void Touchscreen::Motor::Rumble(int padID, double state) { JNIEnv* env; IDCache::GetJavaVM()->AttachCurrentThread(&env, nullptr); - jmethodID rumbleMethod = - env->GetStaticMethodID(IDCache::GetNativeLibraryClass(), "rumble", "(ID)V"); - env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(), rumbleMethod, padID, state); + env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(), IDCache::GetDoRumble(), padID, state); IDCache::GetJavaVM()->DetachCurrentThread(); } } |
