diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-06-08 20:42:15 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-08 20:42:15 +1000 |
| commit | bed2d66bedca7e9537d67d3e7a5506aee8717c8f (patch) | |
| tree | 259ece7474e30a0a0cb70aa0c2ff3fc098640a24 /Source/Core/InputCommon/ControllerInterface | |
| parent | 5a4e2a6b2f8555c590501649ed061592949fb480 (diff) | |
| parent | 0dec8feadb1c6ecca2de3764ccd413a8d950c573 (diff) | |
Merge pull request #8117 from weihuoya/threaded_env
android: get java env from thread local storage
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
| -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 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 |
