mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-08 10:35:47 +00:00
Merge pull request #7726 from zackhow/rumfast
Android: Optimize rumble call
This commit is contained in:
commit
9340ddc7c9
3 changed files with 11 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue