summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Android
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Android')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Android/Android.cpp4
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 0ff62ab48d..9ab4cbf0f8 100644
--- a/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/Android/Android.cpp
@@ -237,10 +237,8 @@ void Touchscreen::Motor::SetState(ControlState state)
void Touchscreen::Motor::Rumble(int padID, double state)
{
- JNIEnv* env;
- IDCache::GetJavaVM()->AttachCurrentThread(&env, nullptr);
+ JNIEnv* env = IDCache::GetEnvForThread();
env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(), IDCache::GetDoRumble(), padID, state);
- IDCache::GetJavaVM()->DetachCurrentThread();
}
} // namespace Android
} // namespace ciface