[Android] Forgot to dettach the SFML thread from the JVM at several places

This commit is contained in:
Jonathan De Wachter 2014-03-11 21:40:15 +01:00
parent 76fddc0729
commit 67c7a5d176

View File

@ -303,6 +303,9 @@ void WindowImplAndroid::processScrollEvent(AInputEvent* _event, ActivityStates*
event.mouseWheel.y = AMotionEvent_getY(_event, 0);
states->pendingEvents.push_back(event);
// Dettach this thread from the JVM
lJavaVM->DetachCurrentThread();
}
@ -607,6 +610,9 @@ int WindowImplAndroid::getUnicode(AInputEvent* event)
jmethodID MethodGetUnicode = lJNIEnv->GetMethodID(ClassKeyEvent, "getUnicodeChar", "(I)I");
int unicode = lJNIEnv->CallIntMethod(ObjectKeyEvent, MethodGetUnicode, metaState);
// Dettach this thread from the JVM
lJavaVM->DetachCurrentThread();
return unicode;
}