From 4979220cf0103d81023c32498870ecfd35ef473b Mon Sep 17 00:00:00 2001 From: zackhow Date: Mon, 21 Jan 2019 19:11:11 -0500 Subject: Android: Optimize rumble call Moved rumble call to IDCache since GetMethodID is expensive --- Source/Core/InputCommon/ControllerInterface/Android/Android.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/Android/Android.cpp') 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(); } } -- cgit v1.2.3